コード例 #1
0
ファイル: roles.php プロジェクト: juslee/e27
								<a href="perms.php" class="permissions">Permissions</a>
							</li>
							<li>
								<a href="admin_index.php" class="user_admin">User Admin</a>
							</li>
						</ul>
					</div>

					<div id="table-content">
						<div id="page">
							<?php 
if ($_GET['action'] == '') {
    ?>
							<h2>Select a Role to Manage:</h2>
							<?php 
    $roles = $myACL->getAllRoles('full');
    foreach ($roles as $k => $v) {
        echo "<a href=\"?action=role&roleID=" . $v['ID'] . "\">" . $v['Name'] . "</a><br />";
    }
    if (count($roles) < 1) {
        echo "No roles yet.<br />";
    }
    ?>
							<input type="button" name="New" value="New Role" onclick="window.location='?action=role'" />
							<?php 
}
if ($_GET['action'] == 'role') {
    if ($_GET['roleID'] == '') {
        ?>
							<h2>New Role:</h2>
							<?php 
コード例 #2
0
ファイル: users.php プロジェクト: juslee/e27
?>
							<?php 
if ($_GET['action'] == 'roles') {
    ?>
 <h2>Manage User Roles: (<?php 
    echo $myACL->getUsername($_GET['userID']);
    ?>
)</h2>
							<form action="users.php" method="post">
								<table border="0" cellpadding="5" cellspacing="0">
									<tr>
										<th></th><th>Member</th><th>Not Member</th>
									</tr>
									<?php 
    $roleACL = new ACL($_GET['userID']);
    $roles = $roleACL->getAllRoles('full');
    foreach ($roles as $k => $v) {
        echo "\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td><label>" . $v['Name'] . "</label></td>";
        echo "<td>\n\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"role_" . $v['ID'] . "\" id=\"role_" . $v['ID'] . "_1\" value=\"1\"";
        if ($roleACL->userHasRole($v['ID'])) {
            echo " checked=\"checked\"";
        }
        echo " /></td>";
        echo "<td>\n\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"role_" . $v['ID'] . "\" id=\"role_" . $v['ID'] . "_0\" value=\"0\"";
        if (!$roleACL->userHasRole($v['ID'])) {
            echo " checked=\"checked\"";
        }
        echo " /></td>";
        echo "\n\t\t\t\t\t\t\t\t\t</tr>";
    }
    ?>