Esempio n. 1
0
function Show404()
{
    ShowErrorPage(404, 'Not Found', "页面当前无法访问");
}
        $this->SetShowTopPageNavigator(false);
        $this->SetShowBottomPageNavigator(false);
        //
        // Http Handlers
        //
        return $result;
    }
    public function OpenAdvancedSearchByDefault()
    {
        return false;
    }
    protected function DoGetGridHeader()
    {
        return '';
    }
}
SetUpUserAuthorization(GetApplication());
try {
    $Page = new total_allocated_hours_smallPage("total_allocated_hours_small.php", "total_allocated_hours_small", GetCurrentUserGrantForDataSource("total allocated hours small"), 'UTF-8');
    $Page->SetShortCaption('Total Allocated Hours dashboard');
    $Page->SetHeader(GetPagesHeader());
    $Page->SetFooter(GetPagesFooter());
    $Page->SetCaption('Total Allocated Hours Small');
    $Page->SetRecordPermission(GetCurrentUserRecordPermissionsForDataSource("total allocated hours small"));
    GetApplication()->SetEnableLessRunTimeCompile(GetEnableLessFilesRunTimeCompilation());
    GetApplication()->SetCanUserChangeOwnPassword(!function_exists('CanUserChangeOwnPassword') || CanUserChangeOwnPassword());
    GetApplication()->SetMainPage($Page);
    GetApplication()->Run();
} catch (Exception $e) {
    ShowErrorPage($e->getMessage());
}
 private function DoOnAfterLogin($userName)
 {
     $connectionFactory = new MyConnectionFactory();
     $connection = $connectionFactory->CreateConnection(GetConnectionOptions());
     try {
         $connection->Connect();
     } catch (Exception $e) {
         ShowErrorPage($e->getMessage());
         die;
     }
     $this->OnAfterLogin($userName, $connection);
     $connection->Disconnect();
 }