Beispiel #1
0
        break;
    }
}
if (!$nameGood) {
    $errorPrinter->doError(400, "Invalid user, '" . $_GET['user'] . "'. Did you mean one of the following? <div style='margin-left: 20px;'>" . implode(" <br/>", array_keys($usernames)) . "</div>");
}
// Start the output
header('Content-Type: text/xml');
print "<slotList>";
/*********************************************************
 * Fetch all of the info for all of the sites and slots
 * that the user is an editor or owner for, so we don't have
 * to get them again.
 *********************************************************/
// this should include all sites that the user owns as well.
$userOwnedSlots = slot::getSlotInfoWhereUserOwner($_GET['user']);
if (!array_key_exists($_GET['user'], $userOwnedSlots)) {
    $userOwnedSlots[$_GET['user']] = array();
    $userOwnedSlots[$_GET['user']]['slot_name'] = $_GET['user'];
    $userOwnedSlots[$_GET['user']]['slot_type'] = 'personal';
    $userOwnedSlots[$_GET['user']]['slot_owner'] = $_GET['user'];
    $userOwnedSlots[$_GET['user']]['site_exits'] = false;
}
// Add any user-owned groups that aren't already in the slot list
$userOwnedGroups = group::getGroupsOwnedBy($_GET['user']);
foreach ($userOwnedGroups as $classSiteName) {
    if (!isset($userOwnedSlots[$classSiteName])) {
        $userOwnedSlots[$classSiteName] = array();
        $userOwnedSlots[$classSiteName]['slot_name'] = $classSiteName;
        $userOwnedSlots[$classSiteName]['slot_type'] = 'class';
        $userOwnedSlots[$classSiteName]['slot_owner'] = $_GET['user'];
Beispiel #2
0
 //add_link(leftnav,"Links");
 foreach ($defaultlinks as $t => $u) {
     add_link(leftnav, $t, "http://" . $u, '', '', "_blank");
 }
 add_link(leftnav, helplink("index"), "1");
 /******************************************************************************
  * List sites
  ******************************************************************************/
 printc("\n<div align='right'>\n\t<a href='email.php?{$sid}&amp;action=user&amp;from=home' onclick='doWindow(\"email\",700,500)' target='email'>Your Posts</a>\n</div>");
 /*********************************************************
  * Fetch all of the info for all of the sites and slots
  * that the user is an editor or owner for, so we don't have
  * to get them again.
  *********************************************************/
 // this should include all sites that the user owns as well.
 $userOwnedSlots = slot::getSlotInfoWhereUserOwner($_SESSION['auser']);
 if (!is_array($userOwnedSlots) || !array_key_exists($_SESSION['auser'], $userOwnedSlots)) {
     $userOwnedSlots[$_SESSION['auser']] = array();
     $userOwnedSlots[$_SESSION['auser']]['slot_name'] = $_SESSION['auser'];
     $userOwnedSlots[$_SESSION['auser']]['slot_type'] = 'personal';
     $userOwnedSlots[$_SESSION['auser']]['slot_owner'] = $_SESSION['auser'];
     $userOwnedSlots[$_SESSION['auser']]['site_exits'] = false;
 }
 if ($_SESSION["expand_othersites"] != 0 || $_SESSION["expand_editorsites"] != 0 || $_SESSION["expand_pastclasses"] != 0 || $_SESSION["expand_upcomingclasses"] != 0 || $_SESSION["expand_personalsites"] != 0) {
     // Add any user-owned groups that aren't already in the slot list
     $userOwnedGroups = group::getGroupsOwnedBy($_SESSION['auser']);
     foreach ($userOwnedGroups as $classSiteName) {
         if (!isset($userOwnedSlots[$classSiteName])) {
             $userOwnedSlots[$classSiteName] = array();
             $userOwnedSlots[$classSiteName]['slot_name'] = $classSiteName;
             $userOwnedSlots[$classSiteName]['slot_type'] = 'class';