Exemple #1
0
$objMember->load();
if ($strSubAction == '') {
    $objTemplate->setText('PAGETITLE', "Members");
    $objMiniMenu->add('Groups', 'index.php?action=groups');
    $arrUsers = clsUser::getUserList();
    print "<table class='members'>";
    print "<tr>";
    print "<th width='150' align='left'>Name</td>";
    print "<th width='100'>Albums</td>";
    print "<th width='100'>Pictures</td>";
    print "</tr>";
    foreach ($arrUsers as $objMember) {
        print "<tr>";
        print "<td><a href='index.php?action=members&subaction=view&" . $objMember->getIDPair() . "' class='nounderline'>" . $objMember->get('username') . "</a></td>";
        print "<td align='center'><a href='index.php?action=albums&subaction=useralbums&" . $objMember->getIDPair() . "' class='nounderline'>" . clsAlbum::getUserAlbumCount($objUser, $objMember) . "</a></td>";
        print "<td align='center'><a href='index.php?action=albums&subaction=userpictures&" . $objMember->getIDPair() . "' class='nounderline'>" . clsAlbum::getUserPictureCount($objUser, $objMember) . "</a></td>";
        print "</tr>";
    }
    print "</table>";
}
if ($strSubAction == 'view') {
    if (clsUser::canEdit($objMember, $objUser)) {
        if ($objMember->isNew()) {
            $objMember->getFromRequest(array('id', 'username', 'password1', 'password2', 'email', 'is_advanced', 'show_empty', 'remember_filter', 'realname', 'location'));
            $objTemplate->setText('PAGETITLE', 'Registration');
            $objBreadcrumbs->add('Registration', "index.php?action=members&subaction=view");
        } else {
            $objTemplate->setText('PAGETITLE', 'Editing ' . $objMember->get('username'));
            $objBreadcrumbs->add('Registration', "index.php?action=members&subaction=view&" . $objMember->getIDPair());
        }
        $objMemberTemplate = new clsTemplate('edituser');