Source for file Area_Admin_Areas.php
Documentation is available at Area_Admin_Areas.php
require_once 'index.php';
echo '<h3>Area Admin Areas</h3>';
$applications = $admin->perm ->getApplications ();
if ($applications === false ) {
echo '<strong>Error on line: '.__LINE__. '</strong><br />';
} elseif (empty ($applications)) {
echo 'Run the <strong>Application</strong> test first<br />';
$areas = $admin->perm ->getAreas ();
echo '<strong>Error on line: '.__LINE__. '</strong><br />';
} elseif (empty ($areas)) {
echo 'Run the <strong>Areas</strong> test first<br />';
$users = $admin->getUsers ('auth');
echo '<strong>Error on line: '.__LINE__. '</strong><br />';
} elseif (empty ($users)) {
echo 'Please run the <a href="User.php'. $qstring. '">User</a> file to be able to test the area admin part.<br />';
for ($i = 0; $i < 15; $i++ ) {
'area_id' => $areas[$id]['area_id'],
'perm_user_id' => $users[$uid]['perm_user_id']
$result = $admin->perm ->addAreaAdmin ($data);
echo '<strong>Error on line: '.__LINE__. '</strong><br />';
echo 'perm user id <strong>' . $users[$uid]['perm_user_id'] . '</strong> was added as admin over area id <strong>' . $areas[$id]['area_id'] . '</strong><br />';
'area_id' => $areas[$id]['area_id']
$filter = array ('filters' => $filters);
$result = $admin->perm ->getAreas ($filter);
echo '<br /><br />The area admins we\'re about to remove<br />';
Var_Dump ::display ($result);
$result = $admin->perm ->removeAreaAdmin ($filters);
echo '<strong>Error on line: '.__LINE__. '</strong><br />';
echo 'Removed area admin with area id <strong>' . $areas[$id]['area_id'] . '</strong><br />';
'perm_user_id' => $users[$uid]['perm_user_id'],
$filter = array ('filters' => $filters);
$result = $admin->perm ->getAreas ($filter);
echo '<br /><br />The areas that the admin was over and we\'re about to remove<br />';
Var_Dump ::display ($result);
$result = $admin->perm ->removeAreaAdmin ($filters);
echo '<strong>Error on line: '.__LINE__. '</strong><br />';
echo 'Removed area admin with perm user id <strong>' . $users[$uid]['perm_user_id'] . '</strong><br />';
'perm_user_id' => $users[$uid]['perm_user_id'],
'area_id' => $areas[$id]['area_id']
$filter = array ('filters' => $filters);
$result = $admin->perm ->getAreas ($filter);
echo '<br /><br />The area admin we\'re about to remove<br />';
Var_Dump ::display ($result);
$result = $admin->perm ->removeAreaAdmin ($filters);
echo '<strong>Error on line: '.__LINE__. '</strong><br />';
echo 'Removed area admin with perm user id <strong>' . $users[$uid]['perm_user_id'] . '</strong>
and area id <strong>' . $areas[$id]['area_id'] . '</strong><br />';
Documentation generated on Mon, 11 Mar 2019 14:16:43 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|