Location: PHPKode > projects > TEMS -Time and Expense Management System > tems/systemconfig/controllerstructure.php
<?php

/*********************************************************************************
 * TES is a Time and Expense Management program developed by
 * Initechs, LLC. Copyright (C) 2009 - 2010 Initechs LLC.
 *
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU General Public License version 3 as published by the
 * Free Software Foundation with the addition of the following permission added
 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
 * IN WHICH THE COPYRIGHT IS OWNED BY INITECHS, INITECHS DISCLAIMS THE WARRANTY
 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
 * details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, see http://www.gnu.org/licenses or write to the Free
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301 USA.
 *
 * You can contact Initechs headquarters at 1841 Piedmont Road, Suite 301,
 * Marietta, GA, USA. or at email address hide@address.com
 *
 * The interactive user interfaces in modified source and object code versions
 * of this program must display Appropriate Legal Notices, as required under
 * Section 5 of the GNU General Public License version 3.
 *
 * In accordance with Section 7(b) of the GNU General Public License version 3,
 * these Appropriate Legal Notices must retain the display od the "Initechs" logo.
 * If the display of the logo is not reasonably feasible for technical reasons,
 * the Appropriate Legal Notices must display the words "Powered by Initechs".

 ********************************************************************************/


$config_array = array(
'invoices' => array('folder' => 'invoices',
		'table' => 'invoiceheaders',
		'dbobj' => 'InvoiceData',
		'actions' => array('List' => array('handler' => 'ListPage', 
						'displaylayout' => 'invoiceHeaderlistLayout',
						'searchlayout' => 'searchLayout',),
				'Browse' => array('handler' => 'BrowsePage', 
						'displaylayout' => 'invoiceHeaderbrowseLayout',),
				'Print' => array('callProgram' => 'invoices/PrintInvoiceReport.php',),
				'Time' => array('localProgram' => 'TimeDetails.php',
						'handler' => 'ListPage', 
						'displaylayout' => 'TimeDetailListLayout',
						'searchlayout' => 'invoiceHeaderbrowseLayout',),
				'Expense' => array('localProgram' => 'ExpenseDetails.php',
                                                'handler' => 'ListPage',
                                                'displaylayout' => 'ExpenseDetailListLayout',
                                                'searchlayout' => 'invoiceHeaderbrowseLayout',),
				'Create' => array('localProgram' => 'Create.php',),
				'Delete' => array('localProgram' => 'Delete.php',),
				),
		),

'times' => array('folder' => 'times',
		'table' => 'times',
		'dbobj' => 'TimeData',
		'actions' => array('Create' => array('callOnSubmit' => 'Create.php',
						'handler' => 'CreatePage',
						'displaylayout' => 'createLayout'),
				'Edit' => array('callOnSubmit' => 'Edit.php', 
						'handler' => 'EditPage', 
						'displaylayout' => 'editLayout',),
				'Browse' => array('handler' => 'BrowsePage', 
						'displaylayout' => 'browseLayout',),
				'Delete' => array('callOnSubmit' => 'Delete.php', 
						'handler' => 'DeletePage', 
						'displaylayout' => 'deleteLayout'),
				'Hold' => array('localProgram' => 'HoldRelease.php',),
				'Release' => array('localProgram' => 'HoldRelease.php',),
				'ListDetail' => array('localProgram' => 'ListPage.php',
						'handler' => 'ListPage', 
						'displaylayout' => 'listLayout',
						'searchlayout' => 'searchLayout',),
				'List' => array('localProgram' => 'SummaryListPage.php',
						'handler' => 'ListPage', 
						'displaylayout' => 'byWeekendListLayout',
						'searchlayout' => 'byWeekendListSearchLayout',),
				'Submit' => array('localProgram' => 'SubmitPage.php',
						'callOnSubmit' => 'Submit.php', 
						'handler' => 'ListPage', 
						'displaylayout' => 'submitTimeDetailLayout',
						'searchlayout' => 'submitSummaryLayout',),
				'Print' => array('callOnSubmit' => 'PrintTime.php', 
						'handler' => 'CreatePage', 
						'displaylayout' => 'printLayout',),
				'Approve' => array('localProgram' => 'SubmitPage.php',
						'callOnSubmit' => 'Approve.php', 
						'handler' => 'ListPage', 
						'displaylayout' => 'submitTimeDetailLayout',
						'searchlayout' => 'approveSummaryLayout',),
				),
		),

'expenseheaders' => array ('folder' => 'expenseheaders',
			'table' => 'expenseheaders',
			'dbobj' => 'ExpenseHeaderData',
			'actions' => array('Create' => array('callOnSubmit' => 'Create.php',
							'handler' => 'CreatePage',
							'displaylayout' => 'createLayout'),
					'Edit' => array('callOnSubmit' => 'Edit.php',
							'handler' => 'EditPage',
							'displaylayout' => 'editLayout'),
					'Browse' => array('handler' => 'BrowsePage', 
							'displaylayout' => 'browseLayout',),
					'Delete' => array('callOnSubmit' => 'Delete.php', 
							'handler' => 'DeletePage', 
							'displaylayout' => 'deleteLayout'),
					'List' => array('localProgram' => 'ListPage.php',
							'handler' => 'ListPage',
							'displaylayout' => 'listLayout',
							'searchlayout' => 'searchLayout'),
					'Submit' => array('localProgram' => 'Submit.php',),
					'Verify' => array('localProgram' => 'Submit.php',),
					'Print' => array('callProgram' => 'expenseheaders/PrintExpenseReport.php',),
					'Hold' => array('localProgram' => 'Submit.php',),
					'Release' => array('localProgram' => 'Submit.php',),
					),
		),

'expensedetails' => array ('folder' => 'expensedetails',
			'table' => 'expensedetails',
			'dbobj' => 'ExpenseDetailData',
			'parent_keys' => 'users_id, projects_id, weekenddate',
			'actions' => array('Create' => array('callOnSubmit' => 'Create.php', 
							'handler' => 'CreatePage', 
							'displaylayout' => 'createLayout'),
					'Edit' => array('callOnSubmit' => 'Edit.php', 
							'handler' => 'EditPage', 
							'displaylayout' => 'editLayout'),
					'Browse' => array('handler' => 'BrowsePage', 
							'displaylayout' => 'browseLayout',),
					'Delete' => array('callOnSubmit' => 'Delete.php', 
							'handler' => 'DeletePage', 
							'displaylayout' => 'deleteLayout'),
					'List' => array('localProgram' => 'ListPage.php',
                                                        'handler' => 'ListPage',
							'displaylayout' => 'listLayout',
							'searchlayout' => 'searchLayout'),
					'Print' => array('callProgram' => 'expenseheaders/PrintExpenseReport.php',
							 'showCondition' => 'action = List',),
					),
			),

'accounts' => array('folder' => 'accounts',
		'table' => 'accounts',
		'dbobj' => 'AccountData',
		'actions' => array('Create' => array('callOnSubmit' => 'Create.php',
						'handler' => 'CreatePage', 
						'displaylayout' => 'createLayout'),
				'Edit' => array('callOnSubmit' => 'Edit.php', 
						'handler' => 'EditPage', 
						'displaylayout' => 'editLayout'),
				'Browse' => array('handler' => 'BrowsePage', 
						'displaylayout' => 'browseLayout',),
				'Delete' => array('callOnSubmit' => 'Delete.php', 
						'handler' => 'DeletePage', 
						'displaylayout' => 'deleteLayout'),
				'List' => array('handler' => 'ListPage', 
						'displaylayout' => 'listLayout',
						'searchlayout' => 'searchLayout',),
				'Print' => array('callOnSubmit' => 'PrintTime.php',
						'handler' => 'CreatePage',
						'displaylayout' => 'printSubmitLayout',),
				),
		),

'projects' => array('folder' => 'projects',
		'table' => 'projects',
		'dbobj' => 'ProjectData',
		'actions' => array('Create' => array('callOnSubmit' => 'Create.php', 
						'handler' => 'CreatePage', 
						'displaylayout' => 'createLayout'),
				'Edit' => array('callOnSubmit' => 'Edit.php', 
						'handler' => 'EditPage', 
						'displaylayout' => 'editLayout'),
				'Browse' => array('handler' => 'BrowsePage', 
						'displaylayout' => 'browseLayout',),
				'Delete' => array('callOnSubmit' => 'Delete.php', 
						'handler' => 'DeletePage', 
						'displaylayout' => 'deleteLayout'),
				'List' => array('handler' => 'ListPage', 
						'displaylayout' => 'listLayout',
						'searchlayout' => 'searchLayout'),
				'Print' => array('callOnSubmit' => 'PrintTime.php',
						'handler' => 'CreatePage',
						'displaylayout' => 'printSubmitLayout',),
				),
		),
				
'tasks' => array('folder' => 'tasks',
		'table' => 'tasks',
		'dbobj' => 'TaskData',
		'actions' => array('Create' => array('callOnSubmit' => 'Create.php', 
						'handler' => 'CreatePage', 
						'displaylayout' => 'createLayout'),
				'Edit' => array('callOnSubmit' => 'Edit.php', 
						'handler' => 'EditPage', 
						'displaylayout' => 'editLayout'),
				'Browse' => array('handler' => 'BrowsePage', 
						'displaylayout' => 'browseLayout',),
				'Delete' => array('callOnSubmit' => 'Delete.php', 
						'handler' => 'DeletePage', 
						'displaylayout' => 'deleteLayout'),
				'List' => array('handler' => 'ListPage', 
						'displaylayout' => 'listLayout',
						'searchlayout' => 'searchLayout'),
				),
		),

'roles' => array('folder' => 'roles',
		'table' => 'roles',
		'dbobj' => 'RoleData',
		'actions' => array('Create' => array('callOnSubmit' => 'Create.php', 
						'handler' => 'CreatePage', 
						'displaylayout' => 'createLayout'),
				'Edit' => array('callOnSubmit' => 'Edit.php', 
						'handler' => 'EditPage', 
						'displaylayout' => 'editLayout'),
				'Browse' => array('handler' => 'BrowsePage', 
						'displaylayout' => 'browseLayout',),
				'Delete' => array('callOnSubmit' => 'Delete.php', 
						'handler' => 'DeletePage', 
						'displaylayout' => 'deleteLayout'),
				'List' => array('handler' => 'ListPage', 
						'displaylayout' => 'listLayout',
						'searchlayout' => 'searchLayout'),
				),
		),
						
'users' => array('folder' => 'users',
		'table' => 'users',
		'dbobj' => 'UserData',
		'actions' => array('Create' => array('callOnSubmit' => 'Create.php', 
						'handler' => 'CreatePage', 
						'displaylayout' => 'createLayout'),
				'Edit' => array('callOnSubmit' => 'Edit.php', 
						'handler' => 'EditPage', 
						'displaylayout' => 'editLayout'),
				'Browse' => array('handler' => 'BrowsePage', 
						'displaylayout' => 'browseLayout',),
				'Delete' => array('callOnSubmit' => 'Delete.php', 
						'handler' => 'DeletePage', 
						'displaylayout' => 'deleteLayout'),
				'List' => array('handler' => 'ListPage', 
						'displaylayout' => 'listLayout',
						'searchlayout' => 'searchLayout'),
				'Login' => array('callOnSubmit' => '../auth/Login.php', 
						'handler' => 'CreatePage', 
						'displaylayout' => 'loginLayout',),
			'ChangePassword' => array('callOnSubmit' => 'ChangePwd.php', 
						'handler' => 'EditPage', 
						'displaylayout' => 'changePasswordLayout'),
				),
	),

'projecttasks' => array('folder' => 'projecttasks',
			'table' => 'projects_tasks',
			'dbobj' => 'ProjectTaskData',
			'parent_keys' => 'projects_id, tasks_id',
			'actions' => array('Create' => array('callOnSubmit' => 'Create.php', 
							'handler' => 'CreatePage', 
							'displaylayout' => 'createLayout'),
                                           'Edit' => array('callOnSubmit' => 'Edit.php',
							'handler' => 'EditPage', 
							'displaylayout' => 'editLayout'),
					  'Browse' => array('handler' => 'BrowsePage',
							'displaylayout' => 'browseLayout',),
					  'Delete' => array('callOnSubmit' => 'Delete.php',
                                                        'handler' => 'DeletePage',
							'displaylayout' => 'deleteLayout'),
					   'List' => array('handler' => 'ListPage',
							'displaylayout' => 'listLayout',
							'searchlayout' => 'searchLayout'),
					),
			),

'projectroles' => array('folder' => 'projectroles',
			'table' => 'projects_roles',
			'dbobj' => 'ProjectRoleData',
			'parent_keys' => 'projects_id, roles_id',
			'actions' => array('Create' => array('callOnSubmit' => 'Create.php', 
							'handler' => 'CreatePage', 
							'displaylayout' => 'createLayout'),
                                            'Edit' => array('callOnSubmit' => 'Edit.php',
							'handler' => 'EditPage', 
							'displaylayout' => 'editLayout'),
					  'Browse' => array('handler' => 'BrowsePage',
							'displaylayout' => 'browseLayout',),
					  'Delete' => array('callOnSubmit' => 'Delete.php',
							'handler' => 'DeletePage', 
							'displaylayout' => 'deleteLayout'),
					   'List' => array('handler' => 'ListPage',
							'displaylayout' => 'listLayout',
							'searchlayout' => 'searchLayout',),
					),
			),

'userprojectsroles' => array('folder' => 'userprojectsroles',
			'table' => 'users_projects_roles',
			'dbobj' => 'UserProjectRoleData',
			'parent_keys' => 'users_id, projects_id, roles_id',
			'actions' => array('Create' => array('callOnSubmit' => 'Create.php', 
                                                            'handler' => 'CreatePage',
                                                            'displaylayout' => 'createLayout'),
                                            'Edit' => array('callOnSubmit' => 'Edit.php',
                                                            'handler' => 'EditPage',
                                                            'displaylayout' => 'editLayout'),
                                            'Browse' => array('handler' => 'BrowsePage',
                                                            'displaylayout' => 'browseLayout',),
                                            'Delete' => array('callOnSubmit' => 'Delete.php',
                                                            'handler' => 'DeletePage',
                                                            'displaylayout' => 'deleteLayout'),
                                            'List' => array('handler' => 'ListPage',
                                                            'displaylayout' => 'listLayout',
                                                            'searchlayout' => 'searchLayout',),
                                            ),
			),

'expensecategories' => array('folder' => 'expensecategories',
                            'table' => 'expensecategories',
                            'dbobj' => 'ExpenseCategoryData',
                            'actions' => array('Create' => array('callOnSubmit' => 'Create.php',
								'handler' => 'CreatePage', 
								'displaylayout' => 'createLayout'),
						'Edit' => array('callOnSubmit' => 'Edit.php', 
								'handler' => 'EditPage', 
								'displaylayout' => 'editLayout'),
						'Browse' => array('handler' => 'BrowsePage', 
								'displaylayout' => 'browseLayout',),
						'Delete' => array('callOnSubmit' => 'Delete.php', 
								'handler' => 'DeletePage',
								'displaylayout' => 'deleteLayout'),
						'List' => array('handler' => 'ListPage', 
								'displaylayout' => 'listLayout',
								'searchlayout' => 'searchLayout',),
						),
			),

'sysadmin' => array('folder' => 'systemadmin',
                    'table' => 'company',
                    'dbobj' => 'SystemData',
                    'actions' => array('List' => array('handler' => 'BrowsePage',
							'displaylayout' => 'browseLayout',),
                               'authorization' => array('module' => 'authorizationlists',
							'action' => 'List',),
                                      'backup' => array('callOnSubmit' => 'BackupData.php',
                                                        'handler' => 'CreatePage',
							'displaylayout' => 'backupLayout'),
                                    'restore' => array('callOnSubmit' => 'RestoreData.php',
							'handler' => 'CreatePage',
							'displaylayout' => 'restoreLayout'),
					'Edit' => array('callOnSubmit' => 'Edit.php', 
							'handler' => 'EditPage', 
							'displaylayout' => 'editLayout'),
				    'literals' => array('module' => 'literals',
							'action' => 'List',),
                                    'messages' => array('module' => 'messages',
							'action' => 'List',),
					),
		),


'authorizationlists' => array('folder' => 'auth',
                            'table' => 'authorizationlists',
                            'dbobj' => 'authData',
                            'actions' => array('Create' => array('localProgram' => 'manageauthorization.php',
								'callOnSubmit' => 'CreatEdit.php',
								'handler' => 'CreatePage', 
								'displaylayout' => 'createLayout'),
						'Edit' => array('localProgram' => 'manageauthorization.php',
								'callOnSubmit' => 'CreatEdit.php', 
								'handler' => 'EditPage', 
								'displaylayout' => 'editLayout'),
                                            'Browse' => array('localProgram' => 'manageauthorization.php',
								'handler' => 'BrowsePage', 
								'displaylayout' => 'browseLayout',),
                                            'Delete' => array('localProgram' => 'manageauthorization.php',
								'callOnSubmit' => 'Delete.php', 
								'handler' => 'DeletePage',
								'displaylayout' => 'deleteLayout'),
						'List' => array('handler' => 'ListPage', 
								'displaylayout' => 'listLayout',
								'searchlayout' => 'searchLayout'),
						),
				),


'literals' => array('folder' => 'literals',
                    'table' => 'literals',
                    'dbobj' => 'LiteralData',
                    'actions' => array('Create' => array('callOnSubmit' => 'Create.php',
							'handler' => 'CreatePage', 
							'displaylayout' => 'createLayout'),
					'Edit' => array('callOnSubmit' => 'Edit.php', 
							'handler' => 'EditPage', 
							'displaylayout' => 'editLayout'),
					'Browse' => array('handler' => 'BrowsePage', 
							'displaylayout' => 'browseLayout',),
					'Delete' => array('callOnSubmit' => 'Delete.php', 
							'handler' => 'DeletePage', 
							'displaylayout' => 'deleteLayout'),
					'List' => array('handler' => 'ListPage', 
							'displaylayout' => 'listLayout',
							'searchlayout' => 'searchLayout'),
					),
                    ),

'messages' => array('folder' => 'messages',
		'table' => 'messages',
		'dbobj' => 'MessagesData',
		'actions' => array('Create' => array('callOnSubmit' => 'Create.php', 
							'handler' => 'CreatePage', 
							'displaylayout' => 'createLayout'),
				'Edit' => array('callOnSubmit' => 'Edit.php', 
						'handler' => 'EditPage', 
						'displaylayout' => 'editLayout'),
				'Browse' => array('handler' => 'BrowsePage', 
						'displaylayout' => 'browseLayout',),
				'Delete' => array('callOnSubmit' => 'Delete.php', 
						'handler' => 'DeletePage', 
						'displaylayout' => 'deleteLayout'),
				'List' => array('handler' => 'ListPage', 
						'displaylayout' => 'listLayout',
						'searchlayout' => 'searchLayout'),
				),
		),

'about' => array('folder' => 'systemconfig',
		'actions' => array( 'List' => array('localProgram' => 'about.php',
							'handler' => 'BrowsePage',),
				),
		),

'install' => array('folder' => 'install',
		   'actions' => array('Create' => array('handler' => 'CreatePage',
							'callOnSubmit' => '../Install.php',
							'displaylayout' => 'installLayout',),
				),
		),

);


?>
Return current item: TEMS -Time and Expense Management System