public function GetPageList() { $currentPageCaption = $this->GetShortCaption(); $result = new PageList($this); if (GetCurrentUserGrantForDataSource('public.office_holder')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Office Holders'), 'public.office_holder.php', $this->RenderText('Office Holders'), $currentPageCaption == $this->RenderText('Office Holders'))); } if (GetCurrentUserGrantForDataSource('public.office')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Political Offices'), 'public.office.php', $this->RenderText('Political Offices'), $currentPageCaption == $this->RenderText('Political Offices'))); } if (GetCurrentUserGrantForDataSource('public.office_docs')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Political Office Filing Documents'), 'public.office_docs.php', $this->RenderText('Political Office Filing Documents'), $currentPageCaption == $this->RenderText('Political Office Filing Documents'))); } if (GetCurrentUserGrantForDataSource('public.election_div')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Election Divisions'), 'public.election_div.php', $this->RenderText('Election Divisions'), $currentPageCaption == $this->RenderText('Election Divisions'))); } if (GetCurrentUserGrantForDataSource('public.election_div_docs')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Election Division Filing Documents'), 'public.election_div_docs.php', $this->RenderText('Election Division Filing Documents'), $currentPageCaption == $this->RenderText('Election Division Filing Documents'))); } if (GetCurrentUserGrantForDataSource('public.district')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Political Districts'), 'public.district.php', $this->RenderText('Political Districts'), $currentPageCaption == $this->RenderText('Political Districts'))); } if (GetCurrentUserGrantForDataSource('public.office_position')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Political Office Positions'), 'public.office_position.php', $this->RenderText('Political Office Positions'), $currentPageCaption == $this->RenderText('Political Office Positions'))); } if (HasAdminPage() && GetApplication()->HasAdminGrantForCurrentUser()) { $result->AddPage(new PageLink($this->GetLocalizerCaptions()->GetMessageString('AdminPage'), 'phpgen_admin.php', $this->GetLocalizerCaptions()->GetMessageString('AdminPage'), false, true)); } return $result; }
public function __construct($name, Page $page, Dataset $dataset) { $this->name = $name; $this->dataset = $dataset; $this->page = $page; $this->superGlobals = GetApplication()->GetSuperGlobals(); }
public function Render(Renderer $renderer) { try { $errorReporting = error_reporting(null); GetApplication()->SetOperation(OPERATION_COMMIT_DELETE); $this->grid->SetState(OPERATION_COMMIT_DELETE); $this->grid->GetState()->SetUseGetToExtractPrimaryKeys(true); $this->grid->ProcessMessages(); header('Content-Type: text/xml'); if ($this->grid->GetErrorMessage() != '') { $xmlWriter = XMLWriterFactory::CreateXMLWriter(); $xmlWriter->StartDocument('1.0', 'UTF-8'); $xmlWriter->StartElement('response'); $xmlWriter->WriteElement('type', 'error'); $xmlWriter->WriteElement('error_message', $this->grid->GetErrorMessage()); $xmlWriter->EndElement('response'); echo $xmlWriter->GetResult(); } else { $xmlWriter = XMLWriterFactory::CreateXMLWriter(); $xmlWriter->StartDocument('1.0', 'UTF-8'); $xmlWriter->StartElement('response'); $xmlWriter->WriteElement('type', 'OK'); $xmlWriter->EndElement('response'); echo $xmlWriter->GetResult(); } error_reporting($errorReporting); } catch (Exception $e) { echo '<?xml version="1.0" encoding="UTF-8"?><response><type>error</type><error_message>' . htmlspecialchars($e->getMessage()) . '</error_message></response>'; } }
public function GetPageList() { $currentPageCaption = $this->GetShortCaption(); $result = new PageList($this); $result->AddGroup($this->RenderText('Default')); if (GetCurrentUserGrantForDataSource('dbo.EtatConnexion')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Dbo.EtatConnexion'), 'dbo.EtatConnexion.php', $this->RenderText('Dbo.EtatConnexion'), $currentPageCaption == $this->RenderText('Dbo.EtatConnexion'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('dbo.EvenementSysteme')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Dbo.EvenementSysteme'), 'dbo.EvenementSysteme.php', $this->RenderText('Dbo.EvenementSysteme'), $currentPageCaption == $this->RenderText('Dbo.EvenementSysteme'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('dbo.InfosFichiers')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Dbo.InfosFichiers'), 'dbo.InfosFichiers.php', $this->RenderText('Dbo.InfosFichiers'), $currentPageCaption == $this->RenderText('Dbo.InfosFichiers'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('dbo.IPClients')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Dbo.IPClients'), 'dbo.IPClients.php', $this->RenderText('Dbo.IPClients'), $currentPageCaption == $this->RenderText('Dbo.IPClients'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('dbo.MachinesClientes')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Dbo.MachinesClientes'), 'dbo.MachinesClientes.php', $this->RenderText('Dbo.MachinesClientes'), $currentPageCaption == $this->RenderText('Dbo.MachinesClientes'), false, $this->RenderText('Default'))); } if (HasAdminPage() && GetApplication()->HasAdminGrantForCurrentUser()) { $result->AddGroup('Admin area'); $result->AddPage(new PageLink($this->GetLocalizerCaptions()->GetMessageString('AdminPage'), 'phpgen_admin.php', $this->GetLocalizerCaptions()->GetMessageString('AdminPage'), false, false, 'Admin area')); } return $result; }
/** * @param TableBasedUserGrantsManager $tableBasedGrantsManager * @param IdentityCheckStrategy $identityCheckStrategy */ private function __construct($tableBasedGrantsManager, $identityCheckStrategy) { $this->tableBasedGrantsManager = $tableBasedGrantsManager; $this->identityCheckStrategy = $identityCheckStrategy; $this->router = $this->CreateAndConfigureRequestRouter(); $this->app = GetApplication(); $this->userIdentityStorage = new UserIdentityCookieStorage($identityCheckStrategy); }
private function GetCurrentPageMode() { switch (GetApplication()->GetOperation()) { case OPERATION_VIEWALL: return PageMode::ViewAll; } return null; }
/** * @param TableBasedUserGrantsManager $tableBasedGrantsManager * @param IdentityCheckStrategy $identityCheckStrategy * @param UserIdentityStorage $userIdentityStorage */ private function __construct(TableBasedUserGrantsManager $tableBasedGrantsManager, IdentityCheckStrategy $identityCheckStrategy, UserIdentityStorage $userIdentityStorage) { $this->tableBasedGrantsManager = $tableBasedGrantsManager; $this->identityCheckStrategy = $identityCheckStrategy; $this->router = $this->CreateAndConfigureRequestRouter(); $this->app = GetApplication(); $this->userIdentityStorage = $userIdentityStorage; }
/** * @param Grid $grid * @param Captions $captions */ public function __construct(Grid $grid, Captions $captions) { $this->captions = $captions; $this->superGlobals = GetApplication()->GetSuperGlobals(); $this->parentGrid = $grid; $this->filter = new Filter($grid->GetPage()->GetContentEncoding()); $this->generator = $this->createSQLGenerator(); $this->fields = array(); }
function SetUpUserAuthorization() { global $usersIds; global $grants; global $appGrants; global $dataSourceRecordPermissions; $userAuthorizationStrategy = new HardCodedUserAuthorization(new UserIdentitySessionStorage(GetIdentityCheckStrategy()), new HardCodedUserGrantsManager($grants, $appGrants), $usersIds); GetApplication()->SetUserAuthorizationStrategy($userAuthorizationStrategy); GetApplication()->SetDataSourceRecordPermissionRetrieveStrategy(new HardCodedDataSourceRecordPermissionRetrieveStrategy($dataSourceRecordPermissions)); }
/** * @param Page $parentPage * @param string $message */ function ShowSecurityErrorPage($parentPage, $message) { $urlToRedirect = ''; if ($parentPage instanceof Page) { $linkBuilder = $parentPage->CreateLinkBuilder(); GetApplication()->GetSuperGlobals()->fillGetParams($linkBuilder); $urlToRedirect = '?redirect=' . urlencode($linkBuilder->GetLink()); } $renderer = new ViewAllRenderer($parentPage->GetLocalizerCaptions()); $errorPage = new CustomErrorPage($parentPage->GetLocalizerCaptions()->GetMessageString('AccessDenied'), $parentPage->GetContentEncoding(), $message, sprintf($parentPage->GetLocalizerCaptions()->GetMessageString('AccessDeniedErrorSuggestions'), 'login.php' . $urlToRedirect), $parentPage); echo $renderer->Render($errorPage); }
public function GetPageList() { $currentPageCaption = $this->GetShortCaption(); $result = new PageList($this); if (GetCurrentUserGrantForDataSource('banner')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Banner Management'), 'banner.php', $this->RenderText('Banner Management'), $currentPageCaption == $this->RenderText('Banner Management'))); } if (HasAdminPage() && GetApplication()->HasAdminGrantForCurrentUser()) { $result->AddPage(new PageLink($this->GetLocalizerCaptions()->GetMessageString('AdminPage'), 'phpgen_admin.php', $this->GetLocalizerCaptions()->GetMessageString('AdminPage'), false, true)); } return $result; }
public function ProcessMessages() { $primaryKeysArray = array(); for ($i = 0; $i < GetApplication()->GetPOSTValue('recordCount'); $i++) { if (GetApplication()->IsPOSTValueSet('rec' . $i)) { // TODO : move GetPrimaryKeyFieldNames function to private $primaryKeys = array(); $primaryKeyNames = $this->grid->GetDataset()->GetPrimaryKeyFieldNames(); for ($j = 0; $j < count($primaryKeyNames); $j++) { $primaryKeys[] = GetApplication()->GetPOSTValue('rec' . $i . '_pk' . $j); } $primaryKeysArray[] = $primaryKeys; } } $inlineInsertedRecordPrimaryKeyNames = GetApplication()->GetSuperGlobals()->GetPostVariablesIf(create_function('$str', 'return StringUtils::StartsWith($str, \'inline_inserted_rec_\') && !StringUtils::Contains($str, \'pk\');')); foreach ($inlineInsertedRecordPrimaryKeyNames as $name => $value) { $primaryKeys = array(); $primaryKeyNames = $this->grid->GetDataset()->GetPrimaryKeyFieldNames(); for ($i = 0; $i < count($primaryKeyNames); $i++) { $primaryKeys[] = GetApplication()->GetSuperGlobals()->GetPostValue($name . '_pk' . $i); } $primaryKeysArray[] = $primaryKeys; } foreach ($primaryKeysArray as $primaryKeyValues) { $this->grid->GetDataset()->SetSingleRecordState($primaryKeyValues); $this->grid->GetDataset()->Open(); if ($this->grid->GetDataset()->Next()) { $message = ''; $fieldValues = $this->grid->GetDataset()->GetCurrentFieldValues(); if ($this->CanChangeData($fieldValues, $message)) { try { $this->grid->GetDataset()->Delete(); $this->DoAfterChangeData($fieldValues); } catch (Exception $e) { $this->grid->GetDataset()->SetAllRecordsState(); $this->ChangeState(OPERATION_VIEWALL); $this->SetGridErrorMessage($e); return; } } else { $this->grid->GetDataset()->SetAllRecordsState(); $this->ChangeState(OPERATION_VIEWALL); $this->SetGridSimpleErrorMessage($message); return; } } $this->grid->GetDataset()->Close(); } $this->ApplyState(OPERATION_VIEWALL); }
function ExtractPrimaryKeyValues(&$primaryKeyValues, $method = METHOD_GET) { $paramNumber = 0; if ($method == METHOD_GET) { while (GetApplication()->IsGETValueSet("pk{$paramNumber}")) { $primaryKeyValues[] = GetApplication()->GetGETValue("pk{$paramNumber}"); $paramNumber++; } } elseif ($method == METHOD_POST) { while (GetApplication()->IsPOSTValueSet("pk{$paramNumber}")) { $primaryKeyValues[] = GetApplication()->GetPOSTValue("pk{$paramNumber}"); $paramNumber++; } } }
function SetUpUserAuthorization() { global $grants; global $appGrants; global $dataSourceRecordPermissions; $hardCodedGrantsManager = new HardCodedUserGrantsManager($grants, $appGrants); $tableBasedGrantsManager = CreateTableBasedGrantsManager(); $grantsManager = new CompositeGrantsManager(); $grantsManager->AddGrantsManager($hardCodedGrantsManager); if (!is_null($tableBasedGrantsManager)) { $grantsManager->AddGrantsManager($tableBasedGrantsManager); GetApplication()->SetUserManager($tableBasedGrantsManager); } $userAuthorizationStrategy = new TableBasedUserAuthorization(new UserIdentitySessionStorage(GetIdentityCheckStrategy()), new MyPDOConnectionFactory(), GetGlobalConnectionOptions(), 'atig_users', 'user_name', 'user_id', $grantsManager); GetApplication()->SetUserAuthorizationStrategy($userAuthorizationStrategy); GetApplication()->SetDataSourceRecordPermissionRetrieveStrategy(new HardCodedDataSourceRecordPermissionRetrieveStrategy($dataSourceRecordPermissions)); }
public function GetPageList() { $currentPageCaption = $this->GetShortCaption(); $result = new PageList($this); $result->AddGroup($this->RenderText('Default')); if (GetCurrentUserGrantForDataSource('clienti')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Clienti'), 'clienti.php', $this->RenderText('Clienti'), $currentPageCaption == $this->RenderText('Clienti'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('articoli')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Articoli'), 'articoli.php', $this->RenderText('Articoli'), $currentPageCaption == $this->RenderText('Articoli'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('famiglie')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Famiglie'), 'famiglie.php', $this->RenderText('Famiglie'), $currentPageCaption == $this->RenderText('Famiglie'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('offerte')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Offerte'), 'offerte.php', $this->RenderText('Offerte'), $currentPageCaption == $this->RenderText('Offerte'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('listino_articoli')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Listino Articoli'), 'listino_articoli.php', $this->RenderText('Listino Articoli'), $currentPageCaption == $this->RenderText('Listino Articoli'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('voci_costo')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Voci Costo'), 'voci_costo.php', $this->RenderText('Voci Costo'), $currentPageCaption == $this->RenderText('Voci Costo'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('formule_calcolo')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Formule Calcolo'), 'formule_calcolo.php', $this->RenderText('Formule Calcolo'), $currentPageCaption == $this->RenderText('Formule Calcolo'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('listini')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Listini'), 'listini.php', $this->RenderText('Listini'), $currentPageCaption == $this->RenderText('Listini'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('scontistica_clienti')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Scontistica Clienti'), 'scontistica_clienti.php', $this->RenderText('Scontistica Clienti'), $currentPageCaption == $this->RenderText('Scontistica Clienti'), false, $this->RenderText('Default'))); } if (HasAdminPage() && GetApplication()->HasAdminGrantForCurrentUser()) { $result->AddGroup('Admin area'); $result->AddPage(new PageLink($this->GetLocalizerCaptions()->GetMessageString('AdminPage'), 'phpgen_admin.php', $this->GetLocalizerCaptions()->GetMessageString('AdminPage'), false, false, 'Admin area')); } return $result; }
function BeforeBeginRenderPage() { if ($this->GetRecordPermission() != null) { if (!$this->GetRecordPermission()->CanAllUsersViewRecords()) { if (GetApplication()->GetCurrentUserId() == null) { $this->dataset->AddFieldFilter('staff_id', new IsNullFieldFilter()); } else { $this->dataset->AddFieldFilter('staff_id', new FieldFilter(GetApplication()->GetCurrentUserId(), '=')); } } } }
private function GetSuperGlobals() { return GetApplication()->GetSuperGlobals(); }
protected function CreateGrid() { $result = new Grid($this, $this->dataset, 'GE_PERSONAGrid'); if ($this->GetSecurityInfo()->HasDeleteGrant()) { $result->SetAllowDeleteSelected(true); } else { $result->SetAllowDeleteSelected(false); } ApplyCommonPageSettings($this, $result); $result->SetUseImagesForActions(false); $result->SetUseFixedHeader(false); $result->SetShowLineNumbers(false); $result->SetHighlightRowAtHover(false); $result->SetWidth(''); $this->CreateGridSearchControl($result); $this->CreateGridAdvancedSearchControl($result); $this->AddOperationsColumns($result); $this->AddFieldColumns($result); $this->AddSingleRecordViewColumns($result); $this->AddEditColumns($result); $this->AddInsertColumns($result); $this->AddPrintColumns($result); $this->AddExportColumns($result); $this->SetShowPageList(true); $this->SetHidePageListByDefault(false); $this->SetExportToExcelAvailable(false); $this->SetExportToWordAvailable(false); $this->SetExportToXmlAvailable(false); $this->SetExportToCsvAvailable(false); $this->SetExportToPdfAvailable(false); $this->SetPrinterFriendlyAvailable(false); $this->SetSimpleSearchAvailable(true); $this->SetAdvancedSearchAvailable(false); $this->SetFilterRowAvailable(false); $this->SetVisualEffectsEnabled(false); $this->SetShowTopPageNavigator(true); $this->SetShowBottomPageNavigator(true); // // Http Handlers // // // View column for SLOGAN field // $column = new TextViewColumn('SLOGAN', 'SLOGAN', $this->dataset); $column->SetOrderable(true); $handler = new ShowTextBlobHandler($this->dataset, $this, 'GE_PERSONAGrid_SLOGAN_handler_list', $column); GetApplication()->RegisterHTTPHandler($handler); // // View column for EMAIL field // $column = new TextViewColumn('EMAIL', 'EMAIL', $this->dataset); $column->SetOrderable(true); $handler = new ShowTextBlobHandler($this->dataset, $this, 'GE_PERSONAGrid_EMAIL_handler_list', $column); GetApplication()->RegisterHTTPHandler($handler); // // View column for SLOGAN field // $column = new TextViewColumn('SLOGAN', 'SLOGAN', $this->dataset); $column->SetOrderable(true); $handler = new ShowTextBlobHandler($this->dataset, $this, 'GE_PERSONAGrid_SLOGAN_handler_view', $column); GetApplication()->RegisterHTTPHandler($handler); // // View column for EMAIL field // $column = new TextViewColumn('EMAIL', 'EMAIL', $this->dataset); $column->SetOrderable(true); $handler = new ShowTextBlobHandler($this->dataset, $this, 'GE_PERSONAGrid_EMAIL_handler_view', $column); GetApplication()->RegisterHTTPHandler($handler); return $result; }
public function GetPageList() { $currentPageCaption = $this->GetShortCaption(); $result = new PageList($this); $result->AddGroup($this->RenderText('Default')); if (GetCurrentUserGrantForDataSource('Dashboard')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Dashboard'), 'Dashboard.php', $this->RenderText('Dashboard'), $currentPageCaption == $this->RenderText('Dashboard'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('program')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Project Type'), 'program.php', $this->RenderText('Project Type'), $currentPageCaption == $this->RenderText('Project Type'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('project')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('View all Projects'), 'project.php', $this->RenderText('Project'), $currentPageCaption == $this->RenderText('View all Projects'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('task')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Tasks - Time Tracking'), 'task.php', $this->RenderText('Tasks - Time Tracking'), $currentPageCaption == $this->RenderText('Tasks - Time Tracking'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('Hours per Project by user')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Hours per Project'), 'Hours per project by user.php', $this->RenderText('Hours per project'), $currentPageCaption == $this->RenderText('Hours per Project'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('staff')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Staff'), 'staff.php', $this->RenderText('Staff'), $currentPageCaption == $this->RenderText('Staff'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('department')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Department'), 'department.php', $this->RenderText('Department'), $currentPageCaption == $this->RenderText('Department'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('Priority')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Priority'), 'Priority.php', $this->RenderText('Priority'), $currentPageCaption == $this->RenderText('Priority'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('task_names')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Task Names'), 'task_names.php', $this->RenderText('Task Names'), $currentPageCaption == $this->RenderText('Task Names'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('Pay Period')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Pay Period'), 'Pay_Period.php', $this->RenderText('Pay Period'), $currentPageCaption == $this->RenderText('Pay Period'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('department_projects')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Department Projects'), 'department_projects.php', $this->RenderText('Department Projects'), $currentPageCaption == $this->RenderText('Department Projects'), false, $this->RenderText('Default'))); } if (HasAdminPage() && GetApplication()->HasAdminGrantForCurrentUser()) { $result->AddGroup('Admin area'); $result->AddPage(new PageLink($this->GetLocalizerCaptions()->GetMessageString('AdminPage'), 'app_admin.php', $this->GetLocalizerCaptions()->GetMessageString('AdminPage'), false, false, 'Admin area')); } return $result; }
public function GetPageList() { $currentPageCaption = $this->GetShortCaption(); $result = new PageList($this); $result->AddGroup($this->RenderText('Default')); if (GetCurrentUserGrantForDataSource('GE.BEBEDOR')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('BEBEDOR'), 'GE.BEBEDOR.php', $this->RenderText('BEBEDOR'), $currentPageCaption == $this->RenderText('BEBEDOR'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.CATEGORIA_INTERES')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('CATEGORIA INTERES'), 'GE.CATEGORIA_INTERES.php', $this->RenderText('CATEGORIA INTERES'), $currentPageCaption == $this->RenderText('CATEGORIA INTERES'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.CIUDAD')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('CIUDAD'), 'GE.CIUDAD.php', $this->RenderText('CIUDAD'), $currentPageCaption == $this->RenderText('CIUDAD'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.COLOR_OJOS')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('COLOR OJOS'), 'GE.COLOR_OJOS.php', $this->RenderText('COLOR OJOS'), $currentPageCaption == $this->RenderText('COLOR OJOS'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.webreports')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Webreports'), 'GE.webreports.php', $this->RenderText('Webreports'), $currentPageCaption == $this->RenderText('Webreports'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.webreport_style')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Webreport Style'), 'GE.webreport_style.php', $this->RenderText('Webreport Style'), $currentPageCaption == $this->RenderText('Webreport Style'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.webreport_sql')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Webreport Sql'), 'GE.webreport_sql.php', $this->RenderText('Webreport Sql'), $currentPageCaption == $this->RenderText('Webreport Sql'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.WINK')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('WINK'), 'GE.WINK.php', $this->RenderText('WINK'), $currentPageCaption == $this->RenderText('WINK'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.webreport_admin')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Webreport Admin'), 'GE.webreport_admin.php', $this->RenderText('Webreport Admin'), $currentPageCaption == $this->RenderText('Webreport Admin'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.VISITA')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('VISITA'), 'GE.VISITA.php', $this->RenderText('VISITA'), $currentPageCaption == $this->RenderText('VISITA'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.TIPO_RELACION')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('TIPO RELACION'), 'GE.TIPO_RELACION.php', $this->RenderText('TIPO RELACION'), $currentPageCaption == $this->RenderText('TIPO RELACION'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.SALARIO')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('SALARIO'), 'GE.SALARIO.php', $this->RenderText('SALARIO'), $currentPageCaption == $this->RenderText('SALARIO'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.RELIGION')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('RELIGION'), 'GE.RELIGION.php', $this->RenderText('RELIGION'), $currentPageCaption == $this->RenderText('RELIGION'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.PERSONA_DISPONIBLEXRELIGION')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('PERSONA DISPONIBLEXRELIGION'), 'GE.PERSONA_DISPONIBLEXRELIGION.php', $this->RenderText('PERSONA DISPONIBLEXRELIGION'), $currentPageCaption == $this->RenderText('PERSONA DISPONIBLEXRELIGION'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.PERSONA_DISPONIBLEXOCUPACION')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('PERSONA DISPONIBLEXOCUPACION'), 'GE.PERSONA_DISPONIBLEXOCUPACION.php', $this->RenderText('PERSONA DISPONIBLEXOCUPACION'), $currentPageCaption == $this->RenderText('PERSONA DISPONIBLEXOCUPACION'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.PERSONA_DISPONIBLEXMASCOTA')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('PERSONA DISPONIBLEXMASCOTA'), 'GE.PERSONA_DISPONIBLEXMASCOTA.php', $this->RenderText('PERSONA DISPONIBLEXMASCOTA'), $currentPageCaption == $this->RenderText('PERSONA DISPONIBLEXMASCOTA'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.PERSONA_DISPONIBLEXINTERES')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('PERSONA DISPONIBLEXINTERES'), 'GE.PERSONA_DISPONIBLEXINTERES.php', $this->RenderText('PERSONA DISPONIBLEXINTERES'), $currentPageCaption == $this->RenderText('PERSONA DISPONIBLEXINTERES'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.PERSONA_DISPONIBLEXEJERCICIO')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('PERSONA DISPONIBLEXEJERCICIO'), 'GE.PERSONA_DISPONIBLEXEJERCICIO.php', $this->RenderText('PERSONA DISPONIBLEXEJERCICIO'), $currentPageCaption == $this->RenderText('PERSONA DISPONIBLEXEJERCICIO'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.PERSONA_DISPONIBLEXCOLOR_PELO')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('PERSONA DISPONIBLEXCOLOR PELO'), 'GE.PERSONA_DISPONIBLEXCOLOR_PELO.php', $this->RenderText('PERSONA DISPONIBLEXCOLOR PELO'), $currentPageCaption == $this->RenderText('PERSONA DISPONIBLEXCOLOR PELO'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.PERSONA_DISPONIBLEXIDIOMA')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('PERSONA DISPONIBLEXIDIOMA'), 'GE.PERSONA_DISPONIBLEXIDIOMA.php', $this->RenderText('PERSONA DISPONIBLEXIDIOMA'), $currentPageCaption == $this->RenderText('PERSONA DISPONIBLEXIDIOMA'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.PERSONA_DISPONIBLE')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('PERSONA DISPONIBLE'), 'GE.PERSONA_DISPONIBLE.php', $this->RenderText('PERSONA DISPONIBLE'), $currentPageCaption == $this->RenderText('PERSONA DISPONIBLE'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.PERSONA')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('PERSONA'), 'GE.PERSONA.php', $this->RenderText('PERSONA'), $currentPageCaption == $this->RenderText('PERSONA'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.PARAMETROS')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('PARAMETROS'), 'GE.PARAMETROS.php', $this->RenderText('PARAMETROS'), $currentPageCaption == $this->RenderText('PARAMETROS'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.PAIS')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('PAIS'), 'GE.PAIS.php', $this->RenderText('PAIS'), $currentPageCaption == $this->RenderText('PAIS'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.OCUPACIONXCATEGORIA_OCUPACION')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('OCUPACIONXCATEGORIA OCUPACION'), 'GE.OCUPACIONXCATEGORIA_OCUPACION.php', $this->RenderText('OCUPACIONXCATEGORIA OCUPACION'), $currentPageCaption == $this->RenderText('OCUPACIONXCATEGORIA OCUPACION'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.OCUPACION')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('OCUPACION'), 'GE.OCUPACION.php', $this->RenderText('OCUPACION'), $currentPageCaption == $this->RenderText('OCUPACION'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.MASCOTA')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('MASCOTA'), 'GE.MASCOTA.php', $this->RenderText('MASCOTA'), $currentPageCaption == $this->RenderText('MASCOTA'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.NIVEL_EDUCACION')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('NIVEL EDUCACION'), 'GE.NIVEL_EDUCACION.php', $this->RenderText('NIVEL EDUCACION'), $currentPageCaption == $this->RenderText('NIVEL EDUCACION'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.INTERESXCATEGORIA_INTERES')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('INTERESXCATEGORIA INTERES'), 'GE.INTERESXCATEGORIA_INTERES.php', $this->RenderText('INTERESXCATEGORIA INTERES'), $currentPageCaption == $this->RenderText('INTERESXCATEGORIA INTERES'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.INTERES')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('INTERES'), 'GE.INTERES.php', $this->RenderText('INTERES'), $currentPageCaption == $this->RenderText('INTERES'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.IDIOMA')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('IDIOMA'), 'GE.IDIOMA.php', $this->RenderText('IDIOMA'), $currentPageCaption == $this->RenderText('IDIOMA'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.GENERO')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('GENERO'), 'GE.GENERO.php', $this->RenderText('GENERO'), $currentPageCaption == $this->RenderText('GENERO'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.FUMADOR')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('FUMADOR'), 'GE.FUMADOR.php', $this->RenderText('FUMADOR'), $currentPageCaption == $this->RenderText('FUMADOR'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.FRECUENCIA_EJERCICIO')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('FRECUENCIA EJERCICIO'), 'GE.FRECUENCIA_EJERCICIO.php', $this->RenderText('FRECUENCIA EJERCICIO'), $currentPageCaption == $this->RenderText('FRECUENCIA EJERCICIO'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.EVENTO')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('EVENTO'), 'GE.EVENTO.php', $this->RenderText('EVENTO'), $currentPageCaption == $this->RenderText('EVENTO'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.FOTO')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('FOTO'), 'GE.FOTO.php', $this->RenderText('FOTO'), $currentPageCaption == $this->RenderText('FOTO'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.ESTADO_CIVIL')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('ESTADO CIVIL'), 'GE.ESTADO_CIVIL.php', $this->RenderText('ESTADO CIVIL'), $currentPageCaption == $this->RenderText('ESTADO CIVIL'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.EJERCICIO')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('EJERCICIO'), 'GE.EJERCICIO.php', $this->RenderText('EJERCICIO'), $currentPageCaption == $this->RenderText('EJERCICIO'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.EDAD')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('EDAD'), 'GE.EDAD.php', $this->RenderText('EDAD'), $currentPageCaption == $this->RenderText('EDAD'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.CONTEXTURA')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('CONTEXTURA'), 'GE.CONTEXTURA.php', $this->RenderText('CONTEXTURA'), $currentPageCaption == $this->RenderText('CONTEXTURA'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.COLOR_PIEL')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('COLOR PIEL'), 'GE.COLOR_PIEL.php', $this->RenderText('COLOR PIEL'), $currentPageCaption == $this->RenderText('COLOR PIEL'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.COLOR_PELO')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('COLOR PELO'), 'GE.COLOR_PELO.php', $this->RenderText('COLOR PELO'), $currentPageCaption == $this->RenderText('COLOR PELO'), false, $this->RenderText('Default'))); } if (GetCurrentUserGrantForDataSource('GE.CATEGORIA_OCUPACION')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('CATEGORIA OCUPACION'), 'GE.CATEGORIA_OCUPACION.php', $this->RenderText('CATEGORIA OCUPACION'), $currentPageCaption == $this->RenderText('CATEGORIA OCUPACION'), false, $this->RenderText('Default'))); } if (HasAdminPage() && GetApplication()->HasAdminGrantForCurrentUser()) { $result->AddGroup('Admin area'); $result->AddPage(new PageLink($this->GetLocalizerCaptions()->GetMessageString('AdminPage'), 'phpgen_admin.php', $this->GetLocalizerCaptions()->GetMessageString('AdminPage'), false, false, 'Admin area')); } return $result; }
protected function CreateGrid() { $result = new Grid($this, $this->dataset, 'public_sga_accionGrid'); if ($this->GetSecurityInfo()->HasDeleteGrant()) $result->SetAllowDeleteSelected(true); else $result->SetAllowDeleteSelected(true); ApplyCommonPageSettings($this, $result); $result->SetUseImagesForActions(true); $defaultSortedColumns = array(); $defaultSortedColumns[] = new SortColumn('id_accion', 'DESC'); $result->setDefaultOrdering($defaultSortedColumns); $result->SetUseFixedHeader(false); $result->SetShowLineNumbers(false); $result->SetHighlightRowAtHover(true); $result->SetWidth(''); $this->CreateGridSearchControl($result); $this->CreateGridAdvancedSearchControl($result); $this->AddFieldColumns($result); $this->AddSingleRecordViewColumns($result); $this->AddEditColumns($result); $this->AddInsertColumns($result); $this->AddPrintColumns($result); $this->AddExportColumns($result); $this->AddOperationsColumns($result); $this->SetShowPageList(true); $this->SetHidePageListByDefault(false); $this->SetExportToExcelAvailable(true); $this->SetExportToWordAvailable(true); $this->SetExportToXmlAvailable(true); $this->SetExportToCsvAvailable(true); $this->SetExportToPdfAvailable(true); $this->SetPrinterFriendlyAvailable(true); $this->SetSimpleSearchAvailable(true); $this->SetAdvancedSearchAvailable(true); $this->SetFilterRowAvailable(true); $this->SetVisualEffectsEnabled(true); $this->SetShowTopPageNavigator(true); $this->SetShowBottomPageNavigator(true); // // Http Handlers // // // View column for fe_horas field // $column = new TextViewColumn('fe_horas', 'Horas Ejecución', $this->dataset); $column->SetOrderable(true); $handler = new ShowTextBlobHandler($this->dataset, $this, 'public_sga_accionGrid_fe_horas_handler_list', $column); GetApplication()->RegisterHTTPHandler($handler);// // View column for fe_horas field // $column = new TextViewColumn('fe_horas', 'Horas Ejecución', $this->dataset); $column->SetOrderable(true); $handler = new ShowTextBlobHandler($this->dataset, $this, 'public_sga_accionGrid_fe_horas_handler_view', $column); GetApplication()->RegisterHTTPHandler($handler); // // View column for ds_referencia field // $column = new TextViewColumn('ds_referencia', 'Descripción', $this->dataset); $column->SetOrderable(true); $handler = new ShowTextBlobHandler($this->dataset, $this, 'public_sga_accionGrid_ds_referencia_handler_view', $column); GetApplication()->RegisterHTTPHandler($handler); return $result; }
private function ExtractOrderValues() { if (GetApplication()->IsGETValueSet('order')) { $orderValue = GetApplication()->GetGETValue('order'); $this->orderColumnFieldName = substr($orderValue, 1, strlen($orderValue) - 1); $this->orderType = $orderValue[0] == 'a' ? otAscending : otDescending; $this->SetSessionVariable($this->internalName . '_' . 'orderColumnFieldName', $this->orderColumnFieldName); $this->SetSessionVariable($this->internalName . '_' . 'orderType', $this->orderType); } elseif (GetOperation() == 'resetorder') { $this->UnSetSessionVariable($this->internalName . '_' . 'orderColumnFieldName'); $this->UnSetSessionVariable($this->internalName . '_' . 'orderType'); $this->ApplyDefaultOrder(); } elseif ($this->IsSessionVariableSet($this->internalName . '_' . 'orderColumnFieldName')) { $this->orderColumnFieldName = $this->GetSessionVariable($this->internalName . '_' . 'orderColumnFieldName'); $this->orderType = $this->GetSessionVariable($this->internalName . '_' . 'orderType'); } else { $this->ApplyDefaultOrder(); } }
protected function CreateGrid() { $result = new Grid($this, $this->dataset, 'projectGrid'); if ($this->GetSecurityInfo()->HasDeleteGrant()) { $result->SetAllowDeleteSelected(true); } else { $result->SetAllowDeleteSelected(false); } ApplyCommonPageSettings($this, $result); $result->SetUseImagesForActions(true); $result->SetInsertClientValidationScript($this->RenderText('if ( Number(fieldValues[\'budget_spent\']) > Number(fieldValues[\'approved_budget\'])) { errorInfo.SetMessage(\'"Budget spent is greater than the Approved Budget"\'); return false; } else if (fieldValues[\'date_start\'] >= fieldValues[\'date_end\']) { errorInfo.SetMessage(\'"Start date is greater than or equal to End date"\'); return false; }')); $result->SetEditClientFormLoadedScript($this->RenderText('if (editors[\'approved\'].getValue() == 1) { editors[\'programm_id\'].setEnabled(false); editors[\'project_name\'].setEnabled(false); editors[\'date_start\'].setEnabled(false); editors[\'date_end\'].setEnabled(false); editors[\'approved_budget\'].setEnabled(false); editors[\'notes\'].setEnabled(false); editors[\'priority\'].setEnabled(false); editors[\'lead\'].setEnabled(false); editors[\'level_of_service\'].setEnabled(false); editors[\'multi_year\'].setEnabled(false); editors[\'public_engagement\'].setEnabled(false); editors[\'year\'].setEnabled(false); editors[\'dept_id\'].setEnabled(false); } else { editors[\'programm_id\'].setEnabled(true); editors[\'project_name\'].setEnabled(true); editors[\'date_start\'].setEnabled(true); editors[\'date_end\'].setEnabled(true); editors[\'approved_budget\'].setEnabled(true); editors[\'notes\'].setEnabled(true); editors[\'priority\'].setEnabled(true); editors[\'lead\'].setEnabled(true); editors[\'level_of_service\'].setEnabled(true); editors[\'multi_year\'].setEnabled(true); editors[\'public_engagement\'].setEnabled(true); editors[\'year\'].setEnabled(true); editors[\'dept_id\'].setEnabled(true); }')); $result->SetEditClientValidationScript($this->RenderText('if ( Number(fieldValues[\'budget_spent\']) > Number(fieldValues[\'approved_budget\'])) { errorInfo.SetMessage(\'"Budget spent is greater than the Approved Budget"\'); return false; } else if (fieldValues[\'date_start\'] >= fieldValues[\'date_end\']) { errorInfo.SetMessage(\'"Start date is greater than or equal to End date"\'); return false; }')); $result->SetUseFixedHeader(false); $result->SetShowLineNumbers(false); $result->SetHighlightRowAtHover(false); $result->SetWidth(''); $this->OnGetCustomTemplate->AddListener('projectGrid' . '_OnGetCustomTemplate', $this); $result->OnCustomDrawCell->AddListener('projectGrid' . '_OnCustomDrawRow', $this); $result->OnCustomRenderColumn->AddListener('projectGrid' . '_' . 'OnCustomRenderColumn', $this); $result->OnCustomRenderTotal->AddListener('projectGrid' . '_' . 'OnCustomRenderTotal', $this); $result->BeforeUpdateRecord->AddListener('projectGrid' . '_' . 'BeforeUpdateRecord', $this); $result->BeforeInsertRecord->AddListener('projectGrid' . '_' . 'BeforeInsertRecord', $this); $this->CreateGridSearchControl($result); $this->CreateGridAdvancedSearchControl($result); $this->AddOperationsColumns($result); $this->AddFieldColumns($result); $this->AddSingleRecordViewColumns($result); $this->AddEditColumns($result); $this->AddInsertColumns($result); $this->AddPrintColumns($result); $this->AddExportColumns($result); $this->SetShowPageList(true); $this->SetHidePageListByDefault(false); $this->SetExportToExcelAvailable(true); $this->SetExportToWordAvailable(true); $this->SetExportToXmlAvailable(false); $this->SetExportToCsvAvailable(true); $this->SetExportToPdfAvailable(true); $this->SetPrinterFriendlyAvailable(true); $this->SetSimpleSearchAvailable(true); $this->SetAdvancedSearchAvailable(true); $this->SetFilterRowAvailable(true); $this->SetVisualEffectsEnabled(true); $this->SetShowTopPageNavigator(true); $this->SetShowBottomPageNavigator(true); // // Http Handlers // $pageView = new taskDetailView0projectPage($this, 'Tasks', 'Tasks', array('project_id'), GetCurrentUserGrantForDataSource('project.task'), 'UTF-8', 20, 'taskDetailEdit0project_handler'); $pageView->SetRecordPermission(GetCurrentUserRecordPermissionsForDataSource('project.task')); $handler = new PageHTTPHandler('taskDetailView0project_handler', $pageView); GetApplication()->RegisterHTTPHandler($handler); $pageEdit = new taskDetailEdit0projectPage($this, array('project_id'), array('project_id'), $this->GetForeingKeyFields(), $this->CreateMasterDetailRecordGridFortaskDetailEdit0projectGrid(), $this->dataset, GetCurrentUserGrantForDataSource('project.task'), 'UTF-8'); $pageEdit->SetRecordPermission(GetCurrentUserRecordPermissionsForDataSource('project.task')); $pageEdit->SetShortCaption('Tasks within this project'); $pageEdit->SetHeader(GetPagesHeader()); $pageEdit->SetFooter(GetPagesFooter()); $pageEdit->SetCaption('Tasks'); $pageEdit->SetHttpHandlerName('taskDetailEdit0project_handler'); $handler = new PageHTTPHandler('taskDetailEdit0project_handler', $pageEdit); GetApplication()->RegisterHTTPHandler($handler); $pageView = new projectDetailView1projectPage($this, 'Project Budget', 'Project Budget', array('project_id'), GetCurrentUserGrantForDataSource('project.project'), 'UTF-8', 20, 'projectDetailEdit1project_handler'); $pageView->SetRecordPermission(GetCurrentUserRecordPermissionsForDataSource('project.project')); $handler = new PageHTTPHandler('projectDetailView1project_handler', $pageView); GetApplication()->RegisterHTTPHandler($handler); $pageEdit = new projectDetailEdit1projectPage($this, array('project_id'), array('project_id'), $this->GetForeingKeyFields(), $this->CreateMasterDetailRecordGridForprojectDetailEdit1projectGrid(), $this->dataset, GetCurrentUserGrantForDataSource('project.project'), 'UTF-8'); $pageEdit->SetRecordPermission(GetCurrentUserRecordPermissionsForDataSource('project.project')); $pageEdit->SetShortCaption('Project Budget Chart'); $pageEdit->SetHeader(GetPagesHeader()); $pageEdit->SetFooter(GetPagesFooter()); $pageEdit->SetCaption('Project Budget'); $pageEdit->SetHttpHandlerName('projectDetailEdit1project_handler'); $handler = new PageHTTPHandler('projectDetailEdit1project_handler', $pageEdit); GetApplication()->RegisterHTTPHandler($handler); $pageView = new project_timeline_detailDetailView2projectPage($this, 'Tasks Gantt view', 'Tasks Gantt view', array('task_project_id'), GetCurrentUserGrantForDataSource('project.project_timeline_detail'), 'UTF-8', 20, 'project_timeline_detailDetailEdit2project_handler'); $pageView->SetRecordPermission(GetCurrentUserRecordPermissionsForDataSource('project.project_timeline_detail')); $handler = new PageHTTPHandler('project_timeline_detailDetailView2project_handler', $pageView); GetApplication()->RegisterHTTPHandler($handler); $pageEdit = new project_timeline_detailDetailEdit2projectPage($this, array('task_project_id'), array('project_id'), $this->GetForeingKeyFields(), $this->CreateMasterDetailRecordGridForproject_timeline_detailDetailEdit2projectGrid(), $this->dataset, GetCurrentUserGrantForDataSource('project.project_timeline_detail'), 'UTF-8'); $pageEdit->SetRecordPermission(GetCurrentUserRecordPermissionsForDataSource('project.project_timeline_detail')); $pageEdit->SetShortCaption('Tasks Gantt view'); $pageEdit->SetHeader(GetPagesHeader()); $pageEdit->SetFooter(GetPagesFooter()); $pageEdit->SetCaption('Tasks Gantt view'); $pageEdit->SetHttpHandlerName('project_timeline_detailDetailEdit2project_handler'); $handler = new PageHTTPHandler('project_timeline_detailDetailEdit2project_handler', $pageEdit); GetApplication()->RegisterHTTPHandler($handler); // // View column for notes field // $column = new TextViewColumn('notes', 'Objectives', $this->dataset); $column->SetOrderable(true); $handler = new ShowTextBlobHandler($this->dataset, $this, 'projectGrid_notes_handler_list', $column); GetApplication()->RegisterHTTPHandler($handler); // // View column for public_engagement field // $column = new TextViewColumn('public_engagement', 'Public Engagement', $this->dataset); $column->SetOrderable(true); $handler = new ShowTextBlobHandler($this->dataset, $this, 'projectGrid_public_engagement_handler_list', $column); GetApplication()->RegisterHTTPHandler($handler); // // View column for notes field // $column = new TextViewColumn('notes', 'Objectives', $this->dataset); $column->SetOrderable(true); $handler = new ShowTextBlobHandler($this->dataset, $this, 'projectGrid_notes_handler_view', $column); GetApplication()->RegisterHTTPHandler($handler); // // View column for public_engagement field // $column = new TextViewColumn('public_engagement', 'Public Engagement', $this->dataset); $column->SetOrderable(true); $handler = new ShowTextBlobHandler($this->dataset, $this, 'projectGrid_public_engagement_handler_view', $column); GetApplication()->RegisterHTTPHandler($handler); return $result; }
protected function CreateGrid() { $result = new Grid($this, $this->dataset, 'listino_articoliGrid'); if ($this->GetSecurityInfo()->HasDeleteGrant()) { $result->SetAllowDeleteSelected(false); } else { $result->SetAllowDeleteSelected(false); } ApplyCommonPageSettings($this, $result); $result->SetUseImagesForActions(true); $result->SetUseFixedHeader(false); $result->SetShowLineNumbers(true); $result->SetAllowOrdering(false); $result->SetHighlightRowAtHover(false); $result->SetWidth(''); $result->BeforeUpdateRecord->AddListener('listino_articoliGrid' . '_' . 'BeforeUpdateRecord', $this); $result->BeforeInsertRecord->AddListener('listino_articoliGrid' . '_' . 'BeforeInsertRecord', $this); $this->CreateGridSearchControl($result); $this->CreateGridAdvancedSearchControl($result); $this->AddFieldColumns($result); $this->AddSingleRecordViewColumns($result); $this->AddEditColumns($result); $this->AddInsertColumns($result); $this->AddPrintColumns($result); $this->AddExportColumns($result); $this->AddOperationsColumns($result); $this->SetShowPageList(true); $this->SetHidePageListByDefault(false); $this->SetExportToExcelAvailable(false); $this->SetExportToWordAvailable(false); $this->SetExportToXmlAvailable(false); $this->SetExportToCsvAvailable(false); $this->SetExportToPdfAvailable(false); $this->SetPrinterFriendlyAvailable(false); $this->SetSimpleSearchAvailable(false); $this->SetAdvancedSearchAvailable(false); $this->SetFilterRowAvailable(true); $this->SetVisualEffectsEnabled(true); $this->SetShowTopPageNavigator(true); $this->SetShowBottomPageNavigator(false); // // Http Handlers // // // View column for lisdesc field // $column = new TextViewColumn('lisdesc', 'Descrizione', $this->dataset); $column->SetOrderable(true); $handler = new ShowTextBlobHandler($this->dataset, $this, 'listino_articoliGrid_lisdesc_handler_list', $column); GetApplication()->RegisterHTTPHandler($handler); // // View column for lisdesc field // $column = new TextViewColumn('lisdesc', 'Descrizione', $this->dataset); $column->SetOrderable(true); $handler = new ShowTextBlobHandler($this->dataset, $this, 'listino_articoliGrid_lisdesc_handler_view', $column); GetApplication()->RegisterHTTPHandler($handler); $lookupDataset = new TableDataset(new MyPDOConnectionFactory(), GetConnectionOptions(), '`elenco_articoli_view`'); $field = new StringField('art-codart'); $field->SetIsNotNull(true); $lookupDataset->AddField($field, false); $field = new StringField('descrizione'); $lookupDataset->AddField($field, false); $lookupDataset->setOrderByField('descrizione', GetOrderTypeAsSQL(otAscending)); $lookupDataset->AddCustomCondition(EnvVariablesUtils::EvaluateVariableTemplate($this->GetColumnVariableContainer(), '')); $handler = new DynamicSearchHandler($lookupDataset, $this, 'edit_lis-codart_descrizione_search', 'art-codart', 'descrizione', null); GetApplication()->RegisterHTTPHandler($handler); $lookupDataset = new TableDataset(new MyPDOConnectionFactory(), GetConnectionOptions(), '`elenco_articoli_view`'); $field = new StringField('art-codart'); $field->SetIsNotNull(true); $lookupDataset->AddField($field, false); $field = new StringField('descrizione'); $lookupDataset->AddField($field, false); $lookupDataset->setOrderByField('descrizione', GetOrderTypeAsSQL(otAscending)); $lookupDataset->AddCustomCondition(EnvVariablesUtils::EvaluateVariableTemplate($this->GetColumnVariableContainer(), '')); $handler = new DynamicSearchHandler($lookupDataset, $this, 'insert_lis-codart_descrizione_search', 'art-codart', 'descrizione', null); GetApplication()->RegisterHTTPHandler($handler); return $result; }
protected function CreateGrid() { $result = new Grid($this, $this->dataset, 'phpgen_user_permsGrid'); if ($this->GetSecurityInfo()->HasDeleteGrant()) { $result->SetAllowDeleteSelected(true); } else { $result->SetAllowDeleteSelected(false); } ApplyCommonPageSettings($this, $result); $result->SetUseImagesForActions(true); $result->SetUseFixedHeader(false); $result->SetShowLineNumbers(false); $result->SetShowKeyColumnsImagesInHeader(false); $result->SetViewMode(ViewMode::TABLE); $result->setEnableRuntimeCustomization(true); $result->SetHighlightRowAtHover(false); $result->SetWidth(''); $this->CreateGridSearchControl($result); $this->CreateGridAdvancedSearchControl($result); $this->AddOperationsColumns($result); $this->AddFieldColumns($result); $this->AddSingleRecordViewColumns($result); $this->AddEditColumns($result); $this->AddInsertColumns($result); $this->AddPrintColumns($result); $this->AddExportColumns($result); $this->SetShowPageList(true); $this->SetExportToExcelAvailable(true); $this->SetExportToWordAvailable(true); $this->SetExportToXmlAvailable(true); $this->SetExportToCsvAvailable(true); $this->SetExportToPdfAvailable(true); $this->SetPrinterFriendlyAvailable(true); $this->SetSimpleSearchAvailable(true); $this->SetAdvancedSearchAvailable(true); $this->SetVisualEffectsEnabled(true); $this->SetShowTopPageNavigator(true); $this->SetShowBottomPageNavigator(true); // // Http Handlers // // // View column for page_name field // $column = new TextViewColumn('page_name', 'Page Name', $this->dataset); $column->SetOrderable(true); $handler = new ShowTextBlobHandler($this->dataset, $this, 'phpgen_user_permsGrid_page_name_handler_list', $column); GetApplication()->RegisterHTTPHandler($handler); // // View column for page_name field // $column = new TextViewColumn('page_name', 'Page Name', $this->dataset); $column->SetOrderable(true); $handler = new ShowTextBlobHandler($this->dataset, $this, 'phpgen_user_permsGrid_page_name_handler_view', $column); GetApplication()->RegisterHTTPHandler($handler); return $result; }
public function ProcessMessages() { if (GetApplication()->IsPOSTValueSet('ResetFilter') && GetApplication()->GetPOSTValue('ResetFilter') == '1' || GetApplication()->IsPOSTValueSet('operation') && GetApplication()->GetPOSTValue('operation') == 'ssearch') { $this->ResetFilter(); } else { if (GetApplication()->IsSessionVariableSet($this->name . 'SearchType')) { $this->ExtractValuesFromSession(); } if (GetApplication()->IsPOSTValueSet('SearchType')) { $this->ExtractValuesFromPost(); } if (isset($this->applyAndOperator)) { $this->ApplyFilterToDataset(); } } return GetApplication()->IsPOSTValueSet('ResetFilter') || GetApplication()->IsPOSTValueSet('operation') && GetApplication()->GetPOSTValue('operation') == 'ssearch'; }
public function NeedResetPage() { $result = GetApplication()->IsGETValueSet($this->GetPrefix() . 'page') && GetApplication()->GetGETValue($this->GetPrefix() . 'page') == 'reset'; return $result; }
public function GetPageList() { $currentPageCaption = $this->GetShortCaption(); $result = new PageList($this); if (GetCurrentUserGrantForDataSource('act_movimientos')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Act Movimientos'), 'act_movimientos.php', $this->RenderText('Act Movimientos'), $currentPageCaption == $this->RenderText('Act Movimientos'))); } if (GetCurrentUserGrantForDataSource('act_ordenes')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Act Ordenes'), 'act_ordenes.php', $this->RenderText('Act Ordenes'), $currentPageCaption == $this->RenderText('Act Ordenes'))); } if (GetCurrentUserGrantForDataSource('activos')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Activos'), 'activos.php', $this->RenderText('Activos'), $currentPageCaption == $this->RenderText('Activos'))); } if (GetCurrentUserGrantForDataSource('almacen')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Almacen'), 'almacen.php', $this->RenderText('Almacen'), $currentPageCaption == $this->RenderText('Almacen'))); } if (GetCurrentUserGrantForDataSource('cartera')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Cartera'), 'cartera.php', $this->RenderText('Cartera'), $currentPageCaption == $this->RenderText('Cartera'))); } if (GetCurrentUserGrantForDataSource('clasecuenta')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Clasecuenta'), 'clasecuenta.php', $this->RenderText('Clasecuenta'), $currentPageCaption == $this->RenderText('Clasecuenta'))); } if (GetCurrentUserGrantForDataSource('clientes')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Clientes'), 'clientes.php', $this->RenderText('Clientes'), $currentPageCaption == $this->RenderText('Clientes'))); } if (GetCurrentUserGrantForDataSource('cod_departamentos')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Cod Departamentos'), 'cod_departamentos.php', $this->RenderText('Cod Departamentos'), $currentPageCaption == $this->RenderText('Cod Departamentos'))); } if (GetCurrentUserGrantForDataSource('cod_municipios_dptos')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Cod Municipios Dptos'), 'cod_municipios_dptos.php', $this->RenderText('Cod Municipios Dptos'), $currentPageCaption == $this->RenderText('Cod Municipios Dptos'))); } if (GetCurrentUserGrantForDataSource('cod_paises')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Cod Paises'), 'cod_paises.php', $this->RenderText('Cod Paises'), $currentPageCaption == $this->RenderText('Cod Paises'))); } if (GetCurrentUserGrantForDataSource('cuentas')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Cuentas'), 'cuentas.php', $this->RenderText('Cuentas'), $currentPageCaption == $this->RenderText('Cuentas'))); } if (GetCurrentUserGrantForDataSource('cuentasfrecuentes')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Cuentasfrecuentes'), 'cuentasfrecuentes.php', $this->RenderText('Cuentasfrecuentes'), $currentPageCaption == $this->RenderText('Cuentasfrecuentes'))); } if (GetCurrentUserGrantForDataSource('egresos')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Egresos'), 'egresos.php', $this->RenderText('Egresos'), $currentPageCaption == $this->RenderText('Egresos'))); } if (GetCurrentUserGrantForDataSource('empresa')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Empresa'), 'empresa.php', $this->RenderText('Empresa'), $currentPageCaption == $this->RenderText('Empresa'))); } if (GetCurrentUserGrantForDataSource('facturas')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Facturas'), 'facturas.php', $this->RenderText('Facturas'), $currentPageCaption == $this->RenderText('Facturas'))); } if (GetCurrentUserGrantForDataSource('gupocuentas')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Gupocuentas'), 'gupocuentas.php', $this->RenderText('Gupocuentas'), $currentPageCaption == $this->RenderText('Gupocuentas'))); } if (GetCurrentUserGrantForDataSource('impret')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Impret'), 'impret.php', $this->RenderText('Impret'), $currentPageCaption == $this->RenderText('Impret'))); } if (GetCurrentUserGrantForDataSource('imv')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Imv'), 'imv.php', $this->RenderText('Imv'), $currentPageCaption == $this->RenderText('Imv'))); } if (GetCurrentUserGrantForDataSource('kardexmercancias')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Kardexmercancias'), 'kardexmercancias.php', $this->RenderText('Kardexmercancias'), $currentPageCaption == $this->RenderText('Kardexmercancias'))); } if (GetCurrentUserGrantForDataSource('librodiario')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Librodiario'), 'librodiario.php', $this->RenderText('Librodiario'), $currentPageCaption == $this->RenderText('Librodiario'))); } if (GetCurrentUserGrantForDataSource('proveedores')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Proveedores'), 'proveedores.php', $this->RenderText('Proveedores'), $currentPageCaption == $this->RenderText('Proveedores'))); } if (GetCurrentUserGrantForDataSource('servicio')->HasViewGrant()) { $result->AddPage(new PageLink($this->RenderText('Servicio'), 'servicio.php', $this->RenderText('Servicio'), $currentPageCaption == $this->RenderText('Servicio'))); } if (HasAdminPage() && GetApplication()->HasAdminGrantForCurrentUser()) { $result->AddPage(new PageLink($this->GetLocalizerCaptions()->GetMessageString('AdminPage'), 'phpgen_admin.php', $this->GetLocalizerCaptions()->GetMessageString('AdminPage'), false, true)); } return $result; }
protected function CreateGrid() { $result = new Grid($this, $this->dataset, 'public_office_holderGrid'); if ($this->GetSecurityInfo()->HasDeleteGrant()) { $result->SetAllowDeleteSelected(false); } else { $result->SetAllowDeleteSelected(false); } ApplyCommonPageSettings($this, $result); $result->SetUseImagesForActions(false); $result->SetUseFixedHeader(false); $result->SetShowLineNumbers(false); $result->SetUseModalInserting(true); $result->SetHighlightRowAtHover(false); $result->SetWidth(''); $this->CreateGridSearchControl($result); $this->CreateGridAdvancedSearchControl($result); $this->AddOperationsColumns($result); $this->AddFieldColumns($result); $this->AddSingleRecordViewColumns($result); $this->AddEditColumns($result); $this->AddInsertColumns($result); $this->AddPrintColumns($result); $this->AddExportColumns($result); $this->SetShowPageList(true); $this->SetHidePageListByDefault(false); $this->SetExportToExcelAvailable(false); $this->SetExportToWordAvailable(false); $this->SetExportToXmlAvailable(false); $this->SetExportToCsvAvailable(false); $this->SetExportToPdfAvailable(false); $this->SetPrinterFriendlyAvailable(false); $this->SetSimpleSearchAvailable(true); $this->SetAdvancedSearchAvailable(false); $this->SetFilterRowAvailable(false); $this->SetVisualEffectsEnabled(false); $this->SetShowTopPageNavigator(true); $this->SetShowBottomPageNavigator(true); // // Http Handlers // // // View column for photo_link field // $column = new TextViewColumn('photo_link', 'Photo Link', $this->dataset); $column->SetOrderable(true); /* <inline edit column> */ // // Edit column for photo_link field // $editor = new TextAreaEdit('photo_link_edit', 50, 8); $editColumn = new CustomEditColumn('Photo Link', 'photo_link', $editor, $this->dataset); $editColumn->SetAllowSetToNull(true); $this->ApplyCommonColumnEditProperties($editColumn); $column->SetEditOperationColumn($editColumn); /* </inline edit column> */ /* <inline insert column> */ // // Edit column for photo_link field // $editor = new TextAreaEdit('photo_link_edit', 50, 8); $editColumn = new CustomEditColumn('Photo Link', 'photo_link', $editor, $this->dataset); $editColumn->SetAllowSetToNull(true); $this->ApplyCommonColumnEditProperties($editColumn); $column->SetInsertOperationColumn($editColumn); /* </inline insert column> */ $handler = new ShowTextBlobHandler($this->dataset, $this, 'public_office_holderGrid_photo_link_handler_list', $column); GetApplication()->RegisterHTTPHandler($handler); // // View column for notes field // $column = new TextViewColumn('notes', 'Notes', $this->dataset); $column->SetOrderable(true); /* <inline edit column> */ // // Edit column for notes field // $editor = new TextAreaEdit('notes_edit', 50, 8); $editColumn = new CustomEditColumn('Notes', 'notes', $editor, $this->dataset); $editColumn->SetAllowSetToNull(true); $this->ApplyCommonColumnEditProperties($editColumn); $column->SetEditOperationColumn($editColumn); /* </inline edit column> */ /* <inline insert column> */ // // Edit column for notes field // $editor = new TextAreaEdit('notes_edit', 50, 8); $editColumn = new CustomEditColumn('Notes', 'notes', $editor, $this->dataset); $editColumn->SetAllowSetToNull(true); $this->ApplyCommonColumnEditProperties($editColumn); $column->SetInsertOperationColumn($editColumn); /* </inline insert column> */ $handler = new ShowTextBlobHandler($this->dataset, $this, 'public_office_holderGrid_notes_handler_list', $column); GetApplication()->RegisterHTTPHandler($handler); // // View column for photo_link field // $column = new TextViewColumn('photo_link', 'Photo Link', $this->dataset); $column->SetOrderable(true); $handler = new ShowTextBlobHandler($this->dataset, $this, 'public_office_holderGrid_photo_link_handler_view', $column); GetApplication()->RegisterHTTPHandler($handler); // // View column for notes field // $column = new TextViewColumn('notes', 'Notes', $this->dataset); $column->SetOrderable(true); $handler = new ShowTextBlobHandler($this->dataset, $this, 'public_office_holderGrid_notes_handler_view', $column); GetApplication()->RegisterHTTPHandler($handler); return $result; }
public function ProcessMessages() { if ($this->superGlobals->GetPostValueDef('edit_operation') == 'commit') { $this->state = VerticalGridState::JSONResponse; GetApplication()->SetOperation(OPERATION_COMMIT); $this->grid->SetState(OPERATION_COMMIT); $this->grid->GetState()->SetIsInlineOperation(true); $this->grid->ProcessMessages(); if ($this->grid->GetErrorMessage() != '') { $this->response['type'] = 'error'; $this->response['error_message'] = $this->grid->GetErrorMessage(); } else { $this->response['type'] = 'ok'; $this->grid->GetDataset()->SetSingleRecordState($this->grid->GetDataset()->GetPrimaryKeyValuesAfterEdit()); GetApplication()->SetOperation(OPERATION_VIEWALL); $this->grid->SetState(OPERATION_VIEWALL); $this->grid->ProcessMessages(); $viewAllRenderer = new ViewAllRenderer($this->grid->GetPage()->GetLocalizerCaptions()); $viewAllRenderer->renderSingleRow = true; $this->response['row'] = $viewAllRenderer->Render($this->grid); } } else { if ($this->superGlobals->GetPostValueDef('edit_operation') == 'commit_insert') { $this->state = VerticalGridState::JSONResponse; GetApplication()->SetOperation(OPERATION_COMMIT_INSERT); $this->grid->SetState(OPERATION_COMMIT_INSERT); $this->grid->GetState()->SetIsInlineOperation(true); $this->grid->GetPage()->UpdateValuesFromUrl(); $this->grid->ProcessMessages(); if ($this->grid->GetErrorMessage() != '') { $this->response['type'] = 'error'; $this->response['error_message'] = $this->grid->GetErrorMessage(); } else { $this->response['type'] = 'ok'; $this->grid->GetDataset()->SetSingleRecordState($this->grid->GetDataset()->GetPrimaryKeyValuesAfterInsert()); GetApplication()->SetOperation(OPERATION_VIEWALL); $this->grid->SetState(OPERATION_VIEWALL); $this->grid->ProcessMessages(); $viewAllRenderer = new ViewAllRenderer($this->grid->GetPage()->GetLocalizerCaptions()); $viewAllRenderer->renderSingleRow = true; $this->response['row'] = $viewAllRenderer->Render($this->grid); } } else { if ($this->superGlobals->GetGetValueDef(ModalOperation::Param) == ModalOperation::OpenModalEditDialog) { GetApplication()->SetOperation(OPERATION_EDIT); $this->grid->SetState(OPERATION_EDIT); } else { if ($this->superGlobals->GetGetValueDef(ModalOperation::Param) == ModalOperation::OpenModalInsertDialog) { $this->state = VerticalGridState::DisplayInsertGrid; GetApplication()->SetOperation(OPERATION_INSERT); $this->grid->SetState(OPERATION_INSERT); } else { if ($this->superGlobals->GetGetValueDef(ModalOperation::Param) == ModalOperation::OpenModalCopyDialog) { $this->state = VerticalGridState::DisplayCopyGrid; GetApplication()->SetOperation(OPERATION_COPY); $this->grid->SetState(OPERATION_COPY); } } } $this->grid->ProcessMessages(); } } }