Пример #1
0
function drawJumpToStaff($selectedID = false)
{
    global $page;
    $nullable = $selectedID === false;
    $return = drawPanel(getString('jump_to') . ' ' . drawSelectUser('', $selectedID, $nullable, 0, true, true, 'Staff Member:'));
    if ($page['is_admin'] && db_grab('SELECT COUNT(*) FROM users_requests WHERE is_active = 1')) {
        $return = drawMessage('There are pending <a href="requests.php">account requests</a> for you to review.') . $return;
    }
    return $return;
}
Пример #2
0
            ?>
'><?php 
        } else {
            ?>
<b><?php 
        }
        echo format_string($o['title'], 26);
        ?>
</b></a></td>
		<?php 
    }
    ?>
	</tr>
</table>
<?php 
} else {
    echo drawPanel(draw_form_select('foo', $orgs, url_id(), false, false, 'location.href=\'' . $request['path'] . '?id=\' + this.value'));
}
if (url_id()) {
    $where = $_GET['id'] == 0 ? ' IS NULL ' : ' = ' . $_GET['id'];
    $links = $page['is_admin'] ? array('add_edit.php' => getString('add_new')) : false;
    echo drawStaffList('u.is_active = 1 AND u.organization_id ' . $where, 'This organization has no staff associated with it.', $links, draw_link($request['path_query'], $page['title']) . ' &gt; ' . db_grab('SELECT title FROM organizations WHERE id = ' . $_GET['id']));
} else {
    $t = new table('foo', drawHeader());
    $t->set_column('title', false, getString('title'));
    foreach ($orgs as &$o) {
        $o['title'] = draw_link('organizations.php?id=' . $o['id'], $o['title']);
    }
    echo $t->draw($orgs);
}
echo drawBottom();