Exemple #1
0
function submitDeleteGroup()
{
    $groupid = getContinuationVar("groupid");
    $type = getContinuationVar("type");
    if ($type == "user") {
        $query = "UPDATE blockRequest " . "SET groupid = 0 " . "WHERE groupid = {$groupid}";
        doQuery($query);
        $table = "usergroup";
    } else {
        $table = "resourcegroup";
    }
    $query = "DELETE FROM {$table} " . "WHERE id = {$groupid}";
    doQuery($query, 315);
    clearPrivCache();
    viewGroups();
}
function groups_admin_main($var)
{
    $op = pnVarCleanFromInput('op');
    extract($var);
    if (!pnSecAuthAction(0, 'Groups::', '::', ACCESS_EDIT)) {
        include 'header.php';
        echo _GROUPSNOAUTH;
        include 'footer.php';
    } else {
        switch ($op) {
            case "secviewgroups":
                viewGroups();
                break;
            case "secviewgroup":
                viewGroup();
                break;
            case "secnewgroup":
                newGroup();
                break;
            case "secaddgroup":
                addGroup();
                break;
            case "secdeletegroup":
                deleteGroup();
                break;
            case "secselectuserforgroup":
                selectUserForGroup();
                break;
            case "secaddusertogroup":
                addUserToGroup();
                break;
            case "secdeleteuserfromgroup":
                deleteUserFromGroup();
                break;
            case "secmodifygroup":
                modifyGroup();
                break;
            case "secrenamegroup":
                renameGroup();
                break;
            default:
                viewGroups();
                break;
        }
    }
}
            <a id='viewMembers' href="viewWatching.php?view={$view}">View All Watching Members</a>
            </div>            
                
            <h6 class='watch'><br>WATCHERS</h6>
            <div class='watchersBox'>
_BA;
viewWatchers($view);
echo <<<_BA
            <br>
            <a id='viewWatchers' href="viewWatchers.php?view={$view}">View All Watchers</a>
            </div>
            
            <h6 class='watch'>MY GROUPS</h6>
            <div class='groupsBox'>
_BA;
viewGroups($view);
echo <<<_BA
                <br><a href='groups.php?view={$view}'>View all my groups</a>
            </div>            
        </div>
            <form method='post' action='photos.php?view={$view}'>
                <input type='submit' class='toPics' value='{$view} Photos'>
            </form>
            <div class='homeThread'>
_BA;
displayProfileThreads($view);
echo <<<_BA
            </div>
        
    </div>
            <a id='viewMembers' href="viewWatching.php?view={$user}">View All Watching Members</a>
            </div>            
                
            <h6 class='watch'><br>WATCHERS</h6>
            <div class='watchersBox'>
_BA;
viewWatchers($user);
echo <<<_BA
            <br>
            <a id='viewWatchers' href="viewWatchers.php?view={$user}">View All Watchers</a>
            </div>
            
            <h6 class='watch'>MY GROUPS</h6>
            <div class='groupsBox'>
_BA;
viewGroups($user);
echo <<<_BA
                <br><a href='groups.php?view={$user}'>View all my groups</a>
            </div>            
        </div>
            <form method='post' action='photos.php?view={$user}'>
                <input type='submit' class='toPics' value='My Photos'>
            </form>
            <div class='createGroup'>
                <b style='float:left'>Create Group</b><br>
                <form method='post' action='profile.php?view={$user}'>
                    Title: <br><textarea type='text' rows='4' cols='60' name='gtitle' value='{$gtitle}'>{$errorA}</textarea>
                    <input type='submit' value='Create Group'>
                </form>
            </div>
            <div class='homeThread'>