Commit 57e496ef authored by Jean-Paul Saman's avatar Jean-Paul Saman

index.php: update

parent 704ce96f
......@@ -14,14 +14,45 @@
// Completely reworked the backup system to use ADODB primitives.
// Added localisation code so that it can be translated.
$perms =& $AppUI->acl();
if (! $perms->checkModule('backup', 'view')) // Should we have an exec permission?
$AppUI->redirect("m=public&a=access_denied");
$perms = &$AppUI->acl();
if (!$perms->checkModuleItem('backup', 'access')) {
$AppUI->redirect(ACCESS_DENIED);
}
// Which tab do we need to show?
$tab = $AppUI->processIntState('backupIdxTab', $_GET, 'tab', 0);
// we check for permissions on this module
$canRead = $perms->checkModule( $m, 'view' );
$canEdit = $perms->checkModule( $m, 'edit' );
$canDelete = $perms->checkModule( $m, 'delete' );
// lock out users that do not have at least readPermission on this module
if (!$canRead) {
$AppUI->redirect( "m=public&a=access_denied" );
}
$title = new CTitleBlock('Backup Database', 'companies.gif', $m, $m .'.'.$a);
$title->addCrumb('index.php?m=backup&a=restore', 'restore xml file');
$title->addCell();
$title->addCell(
'<input type="submit" class="button" value="'.$AppUI->_('restore xml file').'">', '',
'<form action="?m=backup&a=addedit" method="post">', '</form>'
);
$title->show();
// now prepare and show the tabbed information boxes
// The Period default for the timesheets (month,week)
// $period = $AppUI->getPref('TIMESHEET_PERIOD');
// build new tab box object
$tabBox = new CTabBox( "?m=$m", W2P_BASE_DIR . "/modules/$m/", $tab );
$tabBox->add( 'vw_idx_backup', 'All backup' );
$tabBox->show();
// FIXME: the below should be rewritten to match web2Project
?>
<script>
function check_backup_options()
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment