Beispiel #1
0
function showtree($graph, $path = '', $ancestry = '')
{
    $i = 0;
    foreach ($graph as $id => $node) {
        $i++;
        $anc = "{$ancestry}/{$id}";
        $open = substr($path, 0, strlen($anc)) == $anc ? 1 : 0;
        print "<div class=" . ($i < sizeof($graph) ? "mid" : "last") . "><nobr>";
        if (sizeof($node["children"])) {
            print "<img id=bw{$id} src='" . ($open ? "minus.gif" : "plus.gif") . "' width=18 height=9 onclick=\"treefold('{$id}')\">";
        } else {
            print "<img src='nochildren.gif' width=18 height=9>";
        }
        $cur = substr($path, -strlen($id) - 1) === "/{$id}";
        if ($cur) {
            print "<b";
        } else {
            print "<a href='" . projurl($id) . "' target='_parent' onclick=\"return treesel('{$anc}')\"";
        }
        if ($node["status"] != 'pending') {
            print " class=bg{$node['status']}";
        }
        print ">";
        print htmlentities($node["name"]);
        if ($cur) {
            print "</b>";
        } else {
            print "</a>";
        }
        print "</nobr></div>\n";
        if (sizeof($node["children"])) {
            print "<div id=bc{$node['id']} class=" . ($i < sizeof($graph) ? "next" : "nonext") . " style='display:" . ($open ? 'block' : 'none') . "'>\n";
            showtree($node["children"], $path, $anc);
            print "</div>\n";
        }
    }
}
Beispiel #2
0
<?php 
        } else {
            ?>
<td><a href="member.php?id=<?php 
            echo $assignee;
            ?>
"><?php 
            echo $assignee;
            ?>
</a></td>
<?php 
        }
    }
    ?>
<td><a href="<?php 
    echo projurl($projectinfo["id"]);
    ?>
"><?php 
    echo $projectinfo["id"];
    ?>
</a></td>
<td><a href="member.php?id=<?php 
    echo $projectinfo["lead"];
    ?>
"><?php 
    echo $projectinfo["lead"];
    ?>
</a></td>
<td><a href="member.php?id=<?php 
    echo $dispute["plaintiff"];
    ?>
Copyright 2008 John-Paul Gignac

This file is part of Fossfactory-src.

Fossfactory-src is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Fossfactory-src is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
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']);
$submissionid = intval($_REQUEST['submissionid']);
$accept = scrub($_REQUEST['accept']);
if ($accept == 'true') {
    list($rc, $err) = ff_acceptsubmission($username, $submissionid);
} elseif ($accept == 'false') {
    list($rc, $err) = ff_rejectsubmission($username, $submissionid, $_REQUEST["rejectreason"], 0);
} elseif ($accept == 'prejudice') {
    list($rc, $err) = ff_rejectsubmission($username, $submissionid, '', 1);
}
header("Location: " . projurl($id, "tab=submissions"));
?>

Beispiel #4
0
    <tr>
<?php 
    include_once "formattext.php";
    foreach ($duties as $key => $duty) {
        if ($key % 2 == 0) {
            $background = "class=oddrow";
        } else {
            $background = '';
        }
        ?>
    <tr <?php 
        echo $background;
        ?>
>
        <td valign=top><a class=folder href="<?php 
        echo projurl($duty["projectid"]);
        ?>
"><?php 
        echo htmlentities($duty['subject']);
        ?>
</a></td>
        <td align=center valign=top><nobr>&nbsp;&nbsp;<tt><?php 
        echo $duty["deadline"] ? date('M d, H:i:s&\\n\\b\\s\\p;T', $duty['deadline']) : "-";
        ?>
</tt></nobr></td>
    </tr>
<?php 
    }
    ?>
</table><br><br>
<?php 
Beispiel #5
0
        ?>
:<?php 
        echo $repoproject;
        ?>
</tt></b>
</p>
<p>
If it asks you for a password, enter "guest".
</p>
<?php 
    } else {
        ?>
<p>
This project currently has no Git repository, but
<a href="<?php 
        echo projurl($repoproject);
        ?>
">this related project</a> has one.
To work on this project, you will probably want to start by downloading
the related Git repository as follows:
</p>
<p style='margin-left:3em'>
<b><tt>git clone git@<?php 
        echo $hostname;
        ?>
:<?php 
        echo $repoproject;
        ?>
</tt></b>
</p>
<p>
Beispiel #6
0
that portion.  Subprojects are FOSS Factory's mechanism for enabling
collaborative design and development.
</p>

<p>
When a subproject is created, the parent project's project lead may
grant it a portion of the parent project's funding.  The decision will
be made based on the subproject's quality, clarity, scope and relevance.
</p>

<p>
<a href="overview.php#subprojects">Learn more about subprojects.</a>
</p>

<b>Parent Project:</b> <a href="<?php 
echo projurl($parent["id"]);
?>
"><?php 
echo htmlentities($parent["name"]);
?>
</a><br><br>
<input type=hidden name=p value="<?php 
echo $p;
?>
">
</td><td valign="top" rowspan="3" width="0%">
<div class=important>
<b>Tip:</b> When creating low-level subprojects, consider providing detailed
interface descriptions.  (Eg. function prototypes, class interfaces,
command-line specs, etc.)  This will ensure code-compatibility with the rest
of the system.
Beispiel #7
0
    $reqmts = trim($reqmts);
    $fundgoal2 = (int) ($fundgoal * 100);
    if ($_REQUEST["newproject_action"] === 'savedraft') {
        list($rc, $err) = ff_saveprojectdraft($username, $name, $fundgoal2, $reqmts, $draftid === '' ? false : $draftid);
        if ($rc) {
            header("Location: newproject.php?draft={$draftid}&name=" . urlencode($name) . "&reqmts=" . urlencode($reqmts) . "&err=1");
            exit;
        }
        $draftid = $err;
        header("Location: account.php?tab=drafts");
        exit;
    }
    list($rc, $id) = ff_createproject($username, $name, $reqmts, '', false, empty($draftid) ? false : $draftid);
    if (!$rc) {
        ff_setfundinggoal($username, $id, $fundgoal2 . $GLOBALS['pref_currency']);
        header("Location: " . projurl($id));
        exit;
    }
    header("Location: newproject.php?draft={$draftid}&name=" . urlencode($name) . "&reqmts=" . urlencode($reqmts) . "&fundgoal=" . urlencode($fundgoal) . "&err=1");
    exit;
}
apply_template("New Project", array(array("name" => "New Project", "href" => "newproject.php")));
if ($err) {
    print "<div class=error>" . htmlentities($err) . "</div>\n";
}
?>
<h1>Create a New Project</h1>
<script>
function newProjectSubmitCheck() {
    f = document.form;
    if (!f.elements['name'].value.match(/[^ \n\r\t]/) ||
Beispiel #8
0
<?php 
list($rc, $features) = ff_getfeaturedprojects();
if (!$rc && sizeof($features) > 0) {
    ?>
<div style="clear:both">&nbsp;</div>
<div id="featured_projects">
    <h1>Featured Projects <a href="browse.php">(Browse All)</a></h1>
    <ul>
<?php 
    $count = 0;
    foreach ($features as $feature) {
        ?>
        <li>
            <a href="<?php 
        echo projurl($feature["id"]);
        ?>
">
            <h2><?php 
        echo htmlentities($feature["name"]);
        ?>
</h2>
            <p><?php 
        echo htmlentities($feature["abstract"]);
        ?>
</p>
            <h3>Bounty: <em><?php 
        echo convert_money($feature["bounty"]);
        ?>
</em></h3>
            </a>
Beispiel #9
0
?>
&quot;">
    <input type="hidden" name="currency_code" value="<?php 
echo $GLOBALS["pref_currency"];
?>
">
    <input type="hidden" name="no_note" value="1">
    <input type="hidden" name="no_shipping" value="1">
    <input type="hidden" name="tax" value="0">
    <input type="hidden" name="bn" value="PP-SponsorshipsBF">
    <input type="hidden" name="return" value="<?php 
echo htmlentities($GLOBALS["SITE_URL"]);
?>
paypal-return.php">
    <input type="hidden" name="cancel_return" value="<?php 
echo htmlentities($GLOBALS["SITE_URL"]) . projurl($id, "tab=" . scrub($_REQUEST["tab"]));
?>
">
    <input type="hidden" name="notify_url" value="<?php 
echo htmlentities($GLOBALS["SITE_URL"]);
?>
paypal-ipn.php">
    <input type="hidden" name="custom" value="<?php 
echo htmlentities($username);
?>
/<?php 
echo $id;
?>
">
    <div>
    Sponsorship Amount: <?php 
Beispiel #10
0
         $watches = array(array("eventid" => "{$pid}-news"));
         list($rc, $events) = al_getrecentevents('watch:' . $pid . '-news');
         if ($rc == 0) {
             foreach ($events as $e) {
                 $item = new FeedItem();
                 $item->title = $e['subject'];
                 $item->link = $GLOBALS['SITE_URL'] . $e['url'];
                 $item->date = (int) $e['time'];
                 $item->description = formatText($e['body']);
                 $rss->addItem($item);
             }
         }
     }
     $rss->title = '[FF] ' . $pname;
     $rss->description = 'Recent events affecting FOSS Factory project \'' . $pname . '\'';
     $rss->link = $GLOBALS['SITE_URL'] . projurl($pid);
 } else {
     if ($_GET['src'] == 'userevents') {
         include_once "formattext.php";
         $user = scrub($_GET['u']);
         list($rc, $watching) = al_getwatches($user);
         if ($rc == 0) {
             foreach ($watching as $w) {
                 list($rc, $events) = al_getrecentevents('watch:' . $w['eventid']);
                 if ($rc != 0) {
                     continue;
                 }
                 foreach ($events as $e) {
                     $item = new FeedItem();
                     $item->title = $e['subject'];
                     $item->link = $GLOBALS['SITE_URL'] . $e['url'];
Beispiel #11
0
            $ferror[] = $_FILES['thefile']['error'][$key];
        }
    }
    if (!$iserror) {
        //we only process the submission if no errors at all were encountered
        list($rc, $subid) = ff_submitcode($GLOBALS['username'], $files, $_REQUEST['comments'], $id);
        if (!$rc) {
            header("Location: subsuccess.php?id={$id}");
            exit;
        }
        $msg = "There was a problem receiving your file: {$rc} {$subid}";
    } else {
        $msg = "There was a problem in submitting your file(s)";
    }
}
apply_template($projinfo["name"], array(array("name" => "Projects", "href" => "browse.php"), array("name" => $projinfo["name"], "href" => projurl($id)), array("name" => "submit code", "href" => "submission.php?id={$id}")));
?>
<h1>Make a Submission</h1>
<?php 
if ($msg) {
    ?>
<div class=error><?php 
    echo htmlentities($msg);
    ?>
</div>
<?php 
}
?>
<script>
formats = new Array();
<?php 
Beispiel #12
0
error_log(date("Y-m-d H:i:s ") . "Successful PDT: {$info['txn_id']} {$info['txn_type']} {$err}\n{$dump}\n", 3, "{$GLOBALS['DATADIR']}/ipn-errors.log");
$custom = explode("/", $info["custom"]);
if ($info["txn_type"] === 'subscr_payment') {
    if ($custom[4]) {
        header("Location: " . projurl(urlencode($custom[4])));
    } else {
        header("Location: account.php?tab=subscription");
    }
    exit;
}
list($rc, $currencies) = ff_currencies();
if ($rc) {
    print "Error fetching currencies: {$rc} {$currencies}";
    exit;
}
$code = $info["mc_currency"];
$mult = $currencies[$code]["multiplier"];
$gross = round($info["mc_gross"] * $mult);
$fee = round($info["mc_fee"] * $mult);
if ($err !== 'Success' && $err !== 'Repeated transaction') {
    // It was a project creation
    header("Location: createdproject.php?p=" . scrub($err) . "&amt={$gross}{$code}");
    exit;
}
if (sizeof($custom) == 1) {
    // The transaction was a direct reserve deposit
    header("Location: account.php?tab=reserve&err=deposit" . "&currency={$code}&gross={$gross}&fee={$fee}");
    exit;
}
header("Location: " . projurl($custom[1], "pp_err={$no_transfer}" . "&currency={$code}&gross={$gross}&fee={$fee}"));
exit;
Beispiel #13
0
function getduties($username)
{
    $username = scrub($username);
    list($rc, $duties) = ff_getduties($username);
    if ($rc) {
        return array($rc, $duties);
    }
    $result = array();
    foreach ($duties as $key => $duty) {
        list($rc, $projectinfo) = ff_getprojectinfo($duty["projectid"]);
        if ($rc) {
            return array($rc, $projectinfo);
        }
        $deadline = $duty["deadline"];
        $tag = $deadline ? "newduty2" : "newduty";
        if ($duty["type"] == 'dispute-plaintiff') {
            list($rc, $disputeinfo) = ff_getdisputeinfo($duty["id"]);
            if ($rc) {
                return array($rc, $disputeinfo);
            }
            $link = "dispute.php?id={$duty['id']}&requser={$username}";
            $macros = array("subject" => $disputeinfo["subject"], "projectname" => $projectinfo["name"]);
            $textid = "plaintiff";
        } else {
            if ($duty["type"] == 'dispute-defendant') {
                list($rc, $disputeinfo) = ff_getdisputeinfo($duty["id"]);
                if ($rc) {
                    return array($rc, $disputeinfo);
                }
                $link = "dispute.php?id={$duty['id']}&requser={$username}";
                $macros = array("subject" => $disputeinfo["subject"], "username" => $disputeinfo["plaintiff"], "projectname" => $projectinfo["name"], "deadline" => date("D F j, H:i:s T", $deadline));
                if (sizeof($disputeinfo["arguments"] == 1)) {
                    $textid = "{$tag}-newdispute";
                } else {
                    $textid = "{$tag}-dispute";
                }
            } else {
                if ($duty["type"] == 'new-subproject') {
                    list($rc, $pinfo) = ff_getprojectinfo($duty["id"]);
                    if ($rc) {
                        return array($rc, $pinfo);
                    }
                    $link = projurl($duty["projectid"], "tab=subprojects&requser={$username}");
                    $macros = array("projectname" => $pinfo["name"], "parentname" => $projectinfo["name"], "deadline" => date("D F j, H:i:s T", $deadline));
                    $textid = "{$tag}-newsubproject";
                } else {
                    if ($duty["type"] == 'code submission') {
                        // Hide code submission duties on accepted projects
                        if ($projectinfo["status"] == 'accept') {
                            continue;
                        }
                        list($rc, $sinfo) = ff_getsubmissioninfo($duty["id"]);
                        if ($rc) {
                            return array($rc, $sinfo);
                        }
                        $link = projurl($duty["projectid"], "tab=submissions&requser={$username}#submission{$duty['id']}");
                        $macros = array("projectname" => $projectinfo["name"], "submitter" => $sinfo["username"], "deadline" => date("D F j, H:i:s T", $deadline));
                        $textid = "{$tag}-submission";
                    } else {
                        if ($duty["type"] == 'change proposal') {
                            list($rc, $postinfo) = ff_getpostinfo($duty["id"]);
                            if ($rc) {
                                return array($rc, $postinfo);
                            }
                            $link = projurl($duty["projectid"], "requser={$username}&post={$duty['id']}");
                            $macros = array("projectname" => $projectinfo["name"], "submitter" => $postinfo["owner"], "deadline" => date("D F j, H:i:s T", $deadline));
                            $textid = "{$tag}-changeproposal";
                        }
                    }
                }
            }
        }
        list($rc, $subject) = ff_gettext("{$textid}-subject", $macros);
        if ($rc) {
            return array($rc, $subject);
        }
        list($rc, $body) = ff_gettext("{$textid}-body", $macros);
        if ($rc) {
            return array($rc, $body);
        }
        $duty["link"] = $link;
        $duty["subject"] = $subject;
        $duty["body"] = $body;
        $result[$key] = $duty;
    }
    return array(0, $result);
}
Beispiel #14
0
            $ancestry = implode("/", $historyarray['ancestors']);
            if (!$history[$i]['subject']) {
                $history[$i]['subject'] = 'No subject';
            }
            print "<li>";
            print "<span class=postdate>";
            print date("Y-m-d H:i T", $history[$i]["time"]);
            print "</span> ";
            if ($history[$i]["action"] == 'accept') {
                print "<span class=accepted>[ACCEPTED]</span> ";
            } else {
                if ($history[$i]["action"] == 'reject') {
                    print "<span class=rejected>[REJECTED]</span> ";
                }
            }
            print "<a href='" . projurl($id, "post=" . $history[$i]['postid']) . "' onClick='return fold3(\"reqmts{$id}\",\"" . $ancestry . "\")'>";
            print htmlentities($history[$i]['subject']) . "</a>";
            print "</li>\n";
        }
        print "</ul>\n";
    }
    show_forum("reqmts{$id}", $projinfo['name'], 0);
} else {
    if ($tab == 'disputes') {
        include_once "disputelist.php";
        show_dispute($id);
    } else {
        if ($tab == 'subprojects') {
            include_once 'allot.php';
        } else {
            if ($tab == 'sponsors') {
Beispiel #15
0
>
        <td valign=top width="0%"><img class=arrow id="proj-<?php 
    echo $myproject["id"];
    ?>
-arrow" src="arrow-right.gif" onClick="folder('proj-<?php 
    echo $myproject["id"];
    ?>
')"></td>
        <td valign=top width="100%"><a class=folder href="javascript:folder('proj-<?php 
    echo $myproject["id"];
    ?>
')"><?php 
    echo htmlentities($myproject['name']);
    ?>
</a>&nbsp;&nbsp;<a href="<?php 
    echo projurl($myproject["id"]);
    ?>
" style="text-decoration:none">[go]</a>
        <div id="proj-<?php 
    echo $myproject["id"];
    ?>
-div" class=folded>
	<p style="font-size:small">
        <b>Project Lead:</b> <?php 
    echo htmlentities($myproject["lead"]);
    ?>
<br>
        <b>Bounty:</b> <?php 
    echo convert_money($myproject["bounty"]);
    ?>
	</p>
Beispiel #16
0
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Fossfactory-src is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
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/>.
*/
$parentid = scrub($_REQUEST["id"]);
//get subprojects of project
list($rc, $subprojects) = ff_getsubprojects($parentid);
if ($rc) {
    print "Internal error: {$rc} {$subprojects}";
    exit;
}
foreach ($subprojects as $subproject) {
    $allotment = round($_REQUEST["sub{$subproject['id']}"] * 10);
    if (isset($_REQUEST["sub{$subproject['id']}"]) && $allotment >= 0 && $allotment <= 1000 && (!$subproject["allotted"] || $allotment != $subproject["allotment"])) {
        ff_setallotment($username, $parentid, $subproject['id'], $allotment);
    }
    $priority = scrub($_REQUEST["pri{$subproject['id']}"]);
    if ($priority !== $subproject["priority"]) {
        ff_setpriority($username, $parentid, $subproject['id'], $priority);
    }
}
header("Location: " . projurl($parentid, "tab=subprojects"));
exit;
Beispiel #17
0
    return confirm('Really submit this bug report?  Please read everything over carefully before submitting.');
}
</script>
<form method="post" name='form' style="clear:left" onSubmit="return checkAllot()">
<input type=hidden id=stopspam name=stopspam value="no">
<script>document.getElementById('stopspam').value='yes';</script>
<input type=hidden name=p value="<?php 
echo $p;
?>
">
<table border=0 cellpadding=0 cellspacing=0 width="100%"><tr>
<td valign="top" colspan="2" width="100%">

<b>Project:</b> <a href="<?php 
echo projurl($parent["id"], "tab=subprojects");
?>
"><?php 
echo htmlentities($parent["name"]);
?>
</a><br><br>
</td>
</tr><tr><td valign="bottom" width="50%">
<h2>Bug Priority</h2>
<select name=priority>
<?php 
foreach (array_keys($GLOBALS["priorities"]) as $priority) {
    if ($priority === 'subproject') {
        continue;
    }
    ?>
Beispiel #18
0
                    <b>Bounty:</b> <nobr><?php 
        echo htmlentities(format_money($project["bounty"]));
        ?>
</nobr>
                    <?php 
        if (ereg("[1-9]", $project["bounty"]) && !ereg("^[0-9]*{$GLOBALS['pref_currency']}\$", $project["bounty"])) {
            ?>
<nobr>(Approx. <?php 
            echo htmlentities(convert_money($project["bounty"]));
            ?>
)</nobr><?php 
        }
        ?>
                    </p>
                    <a href="<?php 
        echo projurl($project["id"]);
        ?>
">project&nbsp;page</a>
                </div>
            </span></td>
        <td class=lead><?php 
        echo $project['lead'] === '' ? "<i>&lt;none&gt;</i>" : htmlentities($project['lead']);
        ?>
</td>
        <td class=bounty><nobr><?php 
        echo htmlentities(convert_money($project["bounty"]));
        ?>
</nobr></td>
    </tr>
<?php 
    }
Beispiel #19
0
                ?>
<td colspan='4'>
<i>Waiting for the plaintiff to respond...</i>
<?php 
            } else {
                if ($disputeinfo['status'] == 'defendant') {
                    ?>
<td colspan='4'>
<i>Waiting for the project lead to respond...</i>
<?php 
                } else {
                    if ($disputeinfo['status'] == 'waiting') {
                        ?>
<td colspan='4'>
<i>This debate has been concluded, but has not yet been sent for arbitration.  One or more <a href="<?php 
                        echo projurl($disputeinfo["projectid"], "tab=disputes#tabs");
                        ?>
">other disputes</a> must be decided before this one can proceed.</i>
<?php 
                    } else {
                        if ($disputeinfo['status'] == 'conflict') {
                            ?>
<td colspan='4'>
<i>Waiting for the plaintiff to resolve a merge conflict...</i>
<?php 
                        } else {
                            ?>
<td><?php 
                            echo date("Y-m-d H:i\\&\\n\\b\\s\\p\\;T", $disputeinfo["decided"]);
                            ?>
</td>
Beispiel #20
0
This file is part of Fossfactory-src.

Fossfactory-src is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Fossfactory-src is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
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"]);
$tab = scrub($_REQUEST["tab"]);
if ($_GET['type'] == 'project') {
    $stop = intval($_REQUEST["stop"]);
    if ($GLOBALS["username"]) {
        ff_setvote($GLOBALS["username"], $id, !$stop);
    }
}
if ($_GET['type'] == 'funding' && ($_GET['vote'] == 'more' || $_GET['vote'] == 'less')) {
    if ($GLOBALS['username']) {
        ff_setfundingvote($GLOBALS['username'], $id, $_GET['vote'] == 'more');
    }
}
header("Location: " . projurl($id, $tab ? "tab={$tab}" : ""));
Beispiel #21
0
    $id = substr($topicid, 5);
    if (isset($_REQUEST["subject"])) {
        list($rc, $postid) = ff_createpost("{$topicid}", "{$_REQUEST['subject']}", "{$_REQUEST['body']}", $parent, $_REQUEST["anonymous"] ? '' : $username, '', $attachments, $_REQUEST["watchthread"] ? 1 : 0, "dispute.php?id={$disputeid}");
        header("Location: dispute.php?id={$disputeid}&post={$postid}" . ($parent ? "#p{$parent}" : ""));
        exit;
    }
} elseif (substr($topicid, 0, 4) == 'proj') {
    $id = substr($topicid, 4);
    if ($username !== '' && $_REQUEST["watchproject"]) {
        al_createwatch('$id-news', $username);
    }
    if (isset($_REQUEST["subject"])) {
        list($rc, $postid) = ff_createpost("{$topicid}", "{$_REQUEST['subject']}", "{$_REQUEST['body']}", $parent, $_REQUEST["anonymous"] ? '' : $username, '', $attachments, $_REQUEST["watchthread"] ? 1 : 0, projurl($id));
        header("Location: " . projurl($id, "post={$postid}" . ($parent ? "#p{$parent}" : "")));
        exit;
    }
} elseif (substr($topicid, 0, 8) == 'feedback') {
    if (isset($_REQUEST["subject"])) {
        $tab = substr($topicid, 8);
        list($rc, $postid) = ff_createpost("{$topicid}", "{$_REQUEST['subject']}", "{$_REQUEST['body']}", $parent, $_REQUEST["anonymous"] ? '' : $username, '', $attachments, $_REQUEST["watchthread"] ? 1 : 0, "feedback.php" . ($tab ? "?tab={$tab}" : ""));
        header("Location: feedback.php?post={$postid}" . ($tab ? "&tab={$tab}" : "") . ($parent ? "#p{$parent}" : ""));
        exit;
    }
} elseif (substr($topicid, 0, 4) == 'subm') {
    $id = substr($topicid, 4);
    if (isset($_REQUEST["subject"])) {
        list($rc, $postid) = ff_createpost("{$topicid}", "{$_REQUEST['subject']}", "{$_REQUEST['body']}", $parent, $_REQUEST["anonymous"] ? '' : $username, '', $attachments, $_REQUEST["watchthread"] ? 1 : 0, projurl($id, "tab=submissions"));
        header("Location: " . projurl($id, "tab=submissions&post={$postid}" . ($parent ? "#p{$parent}" : "")));
        exit;
    }
}
Beispiel #22
0
function error($rc, $err)
{
    header("Location: " . projurl($GLOBALS["project"], "err=" . urlencode("{$rc} {$err}")));
    exit;
}
Beispiel #23
0
    ?>
<th>Summary</th>
</tr>
<?php 
    foreach ($subprojects as $subproject) {
        $totalallotment += $subproject['allotment'] / 10;
        ?>
    <tr<?php 
        echo $subproject['status'] === 'complete' ? " bgcolor='#c0c0c0'" : "";
        ?>
>
        <td align=right valign=top><?php 
        echo $subproject['status'] === 'complete' ? "<del style='color:#000'>" : '';
        ?>
<a href="<?php 
        echo projurl($subproject["id"]);
        ?>
"><?php 
        echo $subproject['id'];
        ?>
</a><?php 
        echo $subproject['status'] == 'complete' ? '</del>' : '';
        ?>
</td>
        <td valign=top><?php 
        if ($GLOBALS['username'] !== '' && $GLOBALS['username'] == $projinfo['lead']) {
            ?>
                <select name="pri<?php 
            echo $subproject['id'];
            ?>
">
Beispiel #24
0
(at your option) any later version.

Fossfactory-src is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
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/>.
*/
$p = scrub($_REQUEST["p"]);
$amt = "{$_REQUEST['amt']}";
apply_template("Project Created", array(array("name" => "Project Created", "href" => "createdproject.php?p={$p}&amt=" . urlencode($amt))));
?>
<div class=results>
Thank you for creating a new FOSS Factory project.  Your payment of
<?php 
echo format_money($amt);
?>
 has been received.  A receipt
has been emailed to you.  You may log into your account at
<a href="http://www.paypal.com/">www.paypal.com</a> to view details of
the transaction.

<p>
<a href="<?php 
echo projurl($p);
?>
">Continue to Project Page</a>
</p>
Beispiel #25
0
    if( Number(amt) > n_sponsorship_amt[c]) {
        alert('You have requested more funds than are available to retract.\n'+
            'Please enter a smaller amount.');
        return false;
    }
    if( amt.match( toobig_regex[c])) {
        alert('Due to system limitations, the largest amount '+
            'we can handle is '+max_amt[c]+'.');
        return false;
    }
    return true;
}
</script>

<form method=post action="<?php 
echo projurl($id);
?>
" onSubmit="return checkRetractForm()" id="retract-form">
    <input type=hidden name=tab value="<?php 
echo scrub($_REQUEST["tab"]);
?>
">
<p>
Current sponsorship: <?php 
echo format_money($sponsorship);
?>
</p>
<?php 
if ($num_currencies > 1) {
    ?>
    <div>