source: sandbox/workflow/flumen/index.php @ 1293

Revision 1293, 2.0 KB checked in by gbisotto, 15 years ago (diff)

Ticket #609 - Modificada a classe Factory e ProcessFactory? para automatizaro acesso ao objetos

  • Property svn:executable set to *
Line 
1<?php
2/**************************************************************************\
3* eGroupWare                                                                       *
4* http://www.egroupware.org                                                *
5* --------------------------------------------                             *
6*  This program is free software; you can redistribute it and/or modify it *
7*  under the terms of the GNU General Public License as published by the   *
8*  Free Software Foundation; either version 2 of the License, or (at your  *
9*  option) any later version.                                              *
10\**************************************************************************/
11
12/* if the menuaction variable is set, then let the expresso index deal with it */
13if (isset($_GET['menuaction']))
14{
15        /* in case it's an Ajax call from the processes, then check for expired session */
16        if (($_GET['menuaction'] == 'workflow.run_activity.goAjax') && ($_SERVER['HTTP_CONNECTION'] == 'close'))
17        {
18                if (empty($_SESSION))
19                {
20                        /* the session is expired, return a NanoAjax exception */
21                        require_once dirname(__FILE__) . '/inc/nano/JSON.php';
22                        require_once dirname(__FILE__) . '/inc/nano/NanoJsonConverter.class.php';
23                        require_once dirname(__FILE__) . '/inc/nano/NanoController.class.php';
24                        $nanoController = new NanoController();
25                        $nanoController->throwErrorOnAllVirtualRequests('__NANOAJAX_SESSION_EXPIRED__');
26                        exit;
27                }
28        }
29        chdir('..');
30        require_once 'index.php';
31}
32else
33{
34        $phpgw_info = array();
35        $GLOBALS['phpgw_info']['flags'] = array(
36                'currentapp' => 'workflow',
37                'noheader'   => True,
38                'nonavbar'   => True
39        );
40        require_once '../header.inc.php';
41        require_once 'inc/common.inc.php';
42
43        if (isset($_GET['start_tab']))
44        {
45                $start_tab = $_GET['start_tab'];
46        }
47        else
48        {
49                Factory::getForeignInstance('phpgwapi', 'phpgw')->preferences->read_repository();
50                $start_tab = $GLOBALS['phpgw_info']['user']['preferences']['workflow']['startpage'];
51                if (is_null($start_tab))
52                        $start_tab = 1;
53        }
54        ExecMethod('workflow.ui_userinterface.draw', $start_tab);
55}
56?>
Note: See TracBrowser for help on using the repository browser.