[795] | 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 | |
---|
[3061] | 12 | /* Including common stuff to prepare workflow to run. A session start is needed */ |
---|
| 13 | require_once 'inc/common.inc.php'; |
---|
| 14 | |
---|
[795] | 15 | /* if the menuaction variable is set, then let the expresso index deal with it */ |
---|
| 16 | if (isset($_GET['menuaction'])) |
---|
| 17 | { |
---|
| 18 | /* in case it's an Ajax call from the processes, then check for expired session */ |
---|
[2193] | 19 | if (($_GET['menuaction'] == 'workflow.run_activity.goAjax')) |
---|
[795] | 20 | { |
---|
[2193] | 21 | if (empty($_SESSION['phpgw_session']['session_id'])) |
---|
[795] | 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'; |
---|
[2372] | 26 | $nanoController = &Factory::newInstance('NanoController'); |
---|
[795] | 27 | $nanoController->throwErrorOnAllVirtualRequests('__NANOAJAX_SESSION_EXPIRED__'); |
---|
| 28 | exit; |
---|
| 29 | } |
---|
| 30 | } |
---|
| 31 | chdir('..'); |
---|
| 32 | require_once 'index.php'; |
---|
| 33 | } |
---|
| 34 | else |
---|
| 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 | ?> |
---|