source: sandbox/workflow/trunk/index.php @ 2590

Revision 2590, 2.0 KB checked in by viani, 14 years ago (diff)

Ticket #950 - Merged 2348:2589 /trunk/workflow em /sandbox/workflow/trunk/

  • 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/* Including common stuff to prepare workflow to run. A session start is needed */
13require_once 'inc/common.inc.php';
14
15/* if the menuaction variable is set, then let the expresso index deal with it */
16if (isset($_GET['menuaction']))
17{
18        /* in case it's an Ajax call from the processes, then check for expired session */
19        if (($_GET['menuaction'] == 'workflow.run_activity.goAjax'))
20        {
21                if (empty($_SESSION['phpgw_session']['session_id']))
22                {
23                        /* the session is expired, return a NanoAjax exception */
24                        require_once dirname(__FILE__) . '/inc/nano/JSON.php';
25                        require_once dirname(__FILE__) . '/inc/nano/NanoJsonConverter.class.php';
26                        $nanoController = &Factory::newInstance('NanoController');
27                        $nanoController->throwErrorOnAllVirtualRequests('__NANOAJAX_SESSION_EXPIRED__');
28                        exit;
29                }
30        }
31        chdir('..');
32        require_once 'index.php';
33}
34else
35{
36        $phpgw_info = array();
37        $GLOBALS['phpgw_info']['flags'] = array(
38                'currentapp' => 'workflow',
39                'noheader'   => True,
40                'nonavbar'   => True
41        );
42        require_once '../header.inc.php';
43
44        if (isset($_GET['start_tab']))
45        {
46                $start_tab = $_GET['start_tab'];
47        }
48        else
49        {
50                $GLOBALS['phpgw']->preferences->read_repository();
51                $start_tab = $GLOBALS['phpgw_info']['user']['preferences']['workflow']['startpage'];
52                if (is_null($start_tab))
53                        $start_tab = 1;
54        }
55        ExecMethod('workflow.ui_userinterface.draw', $start_tab);
56}
57?>
Note: See TracBrowser for help on using the repository browser.