Example #1
0
 public function getAllowedRecords($uid, $fields = '*', $orderby = '', $index = null, $extra = null, $unused = null)
 {
     return w2PgetUsers();
 }
Example #2
0
				<a href="javascript: void(0);" onclick="return showCalendar('start_date', '<?php 
echo $df;
?>
', 'editFrm', null, true)">
					<img src="<?php 
echo w2PfindImage('calendar.gif');
?>
" width="24" height="12" alt="<?php 
echo $AppUI->_('Calendar');
?>
" border="0" />
				</a>
			</td>
			<td nowrap="nowrap">
				<?php 
$system_users = w2PgetUsers();
?>
				<?php 
echo arraySelect($system_users, 'log_userfilter', 'class="text" style="width: 200px"', $log_userfilter);
?>
			</td>
			<td nowrap="nowrap">
				<input type="checkbox" name="display_week_hours" id="display_week_hours" <?php 
if ($display_week_hours) {
    echo 'checked="checked"';
}
?>
 />
				<label for="display_week_hours"><?php 
echo $AppUI->_('Display allocated hours/week');
?>
Example #3
0
<?php

/* $Id: acls_view.php 1595 2011-01-17 07:37:10Z caseydk $ $URL: https://web2project.svn.sourceforge.net/svnroot/web2project/tags/version2.4/modules/system/acls_view.php $ */
if (!defined('W2P_BASE_DIR')) {
    die('You should not access this file directly.');
}
global $AppUI, $m, $a;
$perms =& $AppUI->acl();
if (!canView('system')) {
    $AppUI->redirect('m=public&a=access_denied');
}
$user_permissions = array();
$users = w2PgetUsers();
if (isset($_POST['user']) && $_POST['user'] != '') {
    $q = new w2p_Database_Query();
    $q->addTable($perms->_db_acl_prefix . 'permissions', 'gp');
    $q->addQuery('gp.*');
    $q->addWhere('user_id IN (' . implode(',', array_keys($users)) . ')');
    if (isset($_POST['user']) && (int) $_POST['user'] > 0) {
        $q->addWhere('user_id = ' . (int) $_POST['user']);
    }
    if ($_POST['module']) {
        $q->addWhere('module = \'' . $_POST['module'] . '\'');
    }
    if ($_POST['action']) {
        $q->addWhere('action = \'' . $_POST['action'] . '\'');
    }
    $q->addOrder('user_name');
    $q->addOrder('module');
    $q->addOrder('action');
    $q->addOrder('item_id');
Example #4
0
$action = w2PgetParam($_POST, 'action', 'all');
$canView = canView('system');
if (!$canView) {
    // let's see if the user has sys access
    $AppUI->redirect(ACCESS_DENIED);
}
$perms =& $AppUI->acl();
$avail_modules = $perms->getModuleList();
$modules = array('all' => 'All Modules');
foreach ($avail_modules as $avail_module) {
    $modules[$avail_module['value']] = $avail_module['value'];
}
$module = isset($modules[$module]) ? $module : 'all';
$actions = array('all' => 'All Actions', 'access' => 'access', 'add' => 'add', 'delete' => 'delete', 'edit' => 'edit', 'view' => 'view');
$action = isset($actions[$action]) ? $action : 'all';
$users = array('' => '(' . $AppUI->_('Select User') . ')') + w2PgetUsers();
$permissions = getPermissions($perms, $user_id, $module, $action);
$titleBlock = new w2p_Theme_TitleBlock('Permission Result Table', 'icon.png', $m);
$titleBlock->addCell('
    <form action="?m=system&a=acls_view" method="post" name="pickUser" accept-charset="utf-8">' . $AppUI->_('View Users Permissions') . ': ' . arraySelect($users, 'user', 'class="text" onchange="javascript:document.pickUser.submit()"', $user_id) . $AppUI->_('View by Module') . ': ' . arraySelect($modules, 'module', 'class="text" onchange="javascript:document.pickUser.submit()"', $module) . $AppUI->_('View by Action') . ': ' . arraySelect($actions, 'action', 'class="text" onchange="javascript:document.pickUser.submit()"', $action) . '</form>', '', '', '');
$titleBlock->addCrumb('?m=system', 'system admin');
$titleBlock->addCrumb('?m=system&u=roles', 'user roles');
$titleBlock->show();
$fieldNames = array('UserID', 'User', 'Display Name', 'Module', 'Item', 'Item Name', 'Action', 'Allow', 'ACL_ID');
$htmlHelper = new w2p_Output_HTMLHelper($AppUI);
?>
<table class="tbl list">
    <tr>
        <?php 
foreach ($fieldNames as $index => $name) {
    ?>