示例#1
0
function my_projects($username)
{
    list($rc, $cooprojects) = ff_getleadprojects($username);
    if ($rc) {
        $cooprojects = array();
    }
    $myprojectids = array();
    // This allows an extra project to be specified in the URL
    if ($_REQUEST["p"]) {
        $myprojectids[] = $_REQUEST["p"];
    }
    // Get the list of the projects which this user is watching.
    list($rc, $watches) = al_getwatches($username);
    if (!$rc) {
        foreach ($watches as $watch) {
            if (ereg("^(p[0-9]+)-news\$", $watch["eventid"], $pieces)) {
                $myprojectids[] = $pieces[1];
            }
        }
    }
    // Get the list of the projects which this user has sponsored.
    global $memberdonations;
    list($rc, $memberdonations) = ff_memberdonations($username, false);
    if ($rc) {
        $memberdonations = array();
    }
    $myprojectids = array_merge($myprojectids, array_keys($memberdonations));
    // Get the list of projects which this user is subscribed to
    global $subscriptions;
    list($rc, $subscriptions) = ff_showsubscriptions($username);
    if ($rc) {
        $subscriptions = array();
    }
    $myprojectids = array_merge($myprojectids, array_keys($subscriptions));
    list($rc, $myprojects) = ff_getprojectinfo($myprojectids);
    if ($rc) {
        $myprojects = array();
    }
    $myprojects = array_merge($cooprojects, $myprojects);
    uasort($myprojects, cmp_projects);
    return $myprojects;
}
示例#2
0
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with Fossfactory-src.  If not, see <http://www.gnu.org/licenses/>.
*/
$id = scrub($_REQUEST["id"]);
list($rc, $memberinfo) = ff_getmemberinfo($id);
if ($rc == 2) {
    print "No such member: {$id}";
    softexit();
}
if ($rc) {
    print "Database error";
    softexit();
}
list($rc, $projects) = ff_getleadprojects($id);
if ($rc) {
    print "Database error";
    softexit();
}
include_once "getduties.php";
list($rc, $duties) = getduties($id);
if ($rc) {
    print "Database error";
    softexit();
}
apply_template("Member: {$memberinfo['name']}", array(array("name" => "Member: {$memberinfo['name']}", "href" => "member.php?id={$id}")), '', false, true);
?>
<h1>Member Information</h1>

<p>