Beispiel #1
0
function delmember_header()
{
    apply_template("Bookkeeping", array(array("name" => "Administration", "href" => "admin.php"), array("name" => "Delete Member", "href" => "deletemember.php")));
    ?>
<h1>Delete Member</h1>
<?php 
}
Beispiel #2
0
        exit;
    }
    list($rc, $err) = ff_requestwithdrawal($username, $email, $amount);
    if ($rc == 9) {
        header("Location: {$GLOBALS['SITE_URL']}" . "account.php?tab=reserve&err=toomuch");
        exit;
    } else {
        if ($rc) {
            header("Location: {$GLOBALS['SITE_URL']}" . "account.php?tab=reserve&err=syserr");
            exit;
        }
    }
    header("Location: {$GLOBALS['SITE_URL']}" . "account.php?tab=reserve&err=success&amount={$amount}");
    exit;
}
apply_template("My Factory", array(array("name" => "My Factory", "href" => "account.php")), '', false, true);
include_once "tabs.php";
$tabs = array("duties" => "My Duties", "projects" => "My Projects", "prefs" => "Settings", "subscription" => "Monthly Sponsorship", "reserve" => "My Reserve", "drafts" => "Drafts");
tab_header($tabs, "account.php", $tab, "duties");
include_once "myprojectsfunc.php";
if ($tab == 'projects') {
    include_once "myprojects.php";
} else {
    if ($tab == 'duties') {
        include_once "myduties.php";
    } else {
        if ($tab == 'prefs') {
            include_once "prefs.php";
        } else {
            if ($tab == 'subscription') {
                include_once "subscription.php";
Beispiel #3
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/>.
*/
// A quick sanity check
if (!isset($GLOBALS["SITE_URL"])) {
    print "<b>You forgot to configure the autoprepend setting.</b>\n";
    exit;
}
apply_template("About Us", array(array("name" => "About Us", "href" => "")), $onload, false, true);
?>

<h1>About FOSS Factory</h1>

<p>
FOSS Factory's mission is to accelerate the advancement of free/open
source software by helping people collaborate on the design, funding, and
development of innovative software ideas.  All software solutions produced
using our system are released under free/open source licenses.  Our unique
model brings the best of innovators from both the entrepreneurial and
FOSS worlds together to solve real world problems using the mass resources
of the FOSS community.
</p>

<p>Learn more about our <a href="team.php">team</a></p>
Beispiel #4
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/>.
*/
apply_template("System Overview", array(array("name" => "System Overview", "href" => "overview.php")));
$n = 1;
function n()
{
    global $n;
    print "{$n}. ";
    $n++;
}
list($rc, $currencies) = ff_currencies();
$currency = $currencies[$GLOBALS["pref_currency"]];
?>
<h1>System Overview</h1>

<p>
FOSS Factory depends on a complex system of checks and balances.
We recommend reading over this document carefully, as it describes some
Beispiel #5
0
            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]/) ||
        !f.elements['reqmts'].value.match(/[^ \n\r\t]/)) {
        alert('Please fill out all the fields before submitting.');
        return false;
    }

    return confirm('Are you sure you want to create the new project?  Please read everything over carefully before submitting.');
Beispiel #6
0
$character = new Character($id);
if (!$character->IsValid()) {
    __printFatalErr("Failed to retrieve character data.", __LINE__, __FILE__);
}
// Perform any simple actions that are requested.
if (isset($_POST['public'])) {
    $public_updated = apply_public($sid, $character, $_POST['public'] == 'true') ? 'Updated!' : 'Update Failed!';
}
if (isset($_POST['inactive'])) {
    $inactive_updated = apply_inactive($sid, $character, $_POST['inactive'] == 'true') ? 'Updated!' : 'Update Failed!';
}
if (isset($_POST['add_profile'])) {
    $profiles_updated = apply_add_profile($character, $_POST['add_profile']) ? 'Updated!' : 'Update Failed!';
}
if (isset($_POST['tid'])) {
    $template_updated = apply_template($sid, $character, (int) $_POST['tid']) ? 'Updated!' : 'Update Failed!';
}
if (isset($_GET['remove_profile'])) {
    $profiles_updated = apply_remove_profile($character, $_GET['remove_profile']) ? 'Updated!' : 'Update Failed!';
}
if (isset($_POST['join_campaign'])) {
    $campaign_updated = apply_join_campaign($character, (int) $_POST['join_campaign']);
}
if (isset($_POST['cancel_join_campaign'])) {
    $campaign_updated = apply_cancel_join_campaign($character) ? 'Updated!' : 'Update Failed!';
}
if (isset($_POST['accept_join_campaign'])) {
    $campaign_updated = apply_accept_join_campaign($character) ? 'Updated!' : 'Update Failed!';
}
if (isset($_POST['leave_campaign'])) {
    $campaign_updated = apply_leave_campaign($character) ? 'Updated!' : 'Update Failed';
        $items[$i]['image_title'] = $items[$i]['name'] . ' by ' . $items[$i]['by'];
        $desc = $xpath->getNode($item['xpath'] . '/description[1]');
        $items[$i]['description'] = implode(' ', $desc['childNodes']);
        //$xpath->wholeText($item['xpath'].'/description[1]');
        $items[$i]['location'] = $xpath->wholeText($item['xpath'] . '/location[1]');
        $li = 1;
        $link = $xpath->getNode($item['xpath'] . "/link[{$li}]");
        while ($link !== false) {
            $items[$i]['links'] .= "<a href=\"{$link[attributes][href]}\">{$link[textParts][0]}</a><br />";
            $li++;
            $link = $xpath->getNode($item['xpath'] . "/link[{$li}]");
        }
        if (count($items[$i]['links']) > 0) {
            $items[$i]['links_title'] = 'Links:<br />';
        }
        $html .= apply_template($items[$i], BASEDIR . '/templates/template.curated.item.html');
        $i++;
    }
}
$template = BASEDIR . '/templates/template.html';
$templatepiece = BASEDIR . '/templates/template.test.html';
$page = new xhtml_page($template);
$page->set('title', 'Testing');
$piece = new xhtml_piece($templatepiece);
$page->set('content', $piece->out());
$page->set('replaceme', $html);
$fp = fopen(BASEDIR . '/testout.php', 'w');
fwrite($fp, $page->out());
fclose($fp);
echo $page->out();
echo '<pre>';
Beispiel #8
0
        include_once "loginlogic.php";
        list($rc, $err) = log_in($memberinfo["username"], $sid, $remember);
        if ($rc) {
            print "Internal system error: {$rc} {$err}";
            exit;
        }
        if ($url === '') {
            $url = "account.php";
        }
        header("Location: {$GLOBALS['SITE_URL']}{$url}");
        exit;
    }
    header("Location: {$GLOBALS['SITE_URL']}login.php?url=" . urlencode($url) . "&u=" . urlencode($userid) . "&remember=" . urlencode($remember) . "&err=" . urlencode($err));
    exit;
}
apply_template("Member Login", array(array("name" => "Login", "href" => "login.php")));
if (isset($msg) && !$err) {
    $err = $msg;
}
if ($err) {
    print "<div class=error>" . htmlentities($err) . "</div>\n";
}
?>
<form class=loginform method="post" action="<?php 
echo $GLOBALS["SECURE_URL"];
?>
login.php" id=loginform>
<?php 
if ($url !== '') {
    ?>
<input type=hidden name=url value="<?php 
Beispiel #9
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/>.
*/
apply_template("Charities and Non-Profits", array(array("name" => "Charities and Non-Profits", "href" => "charities.php")), '', false, true);
?>
<h1>Charities and Non-Profits</h1>
<?php 
list($rc, $charities) = ff_getcharities();
if ($rc) {
    print "<div class=error>System error.  Please try again later.</div>\n";
    softexit();
}
?>
<p>
FOSS Factory collects money for the following organizations via our
<a href="overview.php#communitydeduction">community deduction</a> system.
Please use our <a href="feedback.php">feedback</a> page to recommend
other charitable groups.
</p>
Beispiel #10
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/>.
*/
apply_template("Why we need FOSS Factory", array(array("name" => "Why we need FOSS Factory", "href" => "why.php")), '', false, true);
?>
<h1>Why we need FOSS Factory</h1>

<p>
The free software movement doesn't need a bounty model.  On the contrary,
the movement has proven to be an incredibly powerful force, turning
whole segments of the software industry on their heads, forcing countless
major corporations to rethink their business models.
</p>

<div class=sidenote1>
With FOSS Factory, a project can get its start from just an itch and a
preliminary plan.
</div>
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
            break;
        }
        // Log the person in.
        include_once "loginlogic.php";
        log_in($uname, $sid);
        if ($url !== '') {
            header("Location: {$GLOBALS['SITE_URL']}{$url}");
            exit;
        }
        header("Location: {$GLOBALS['SITE_URL']}account.php");
        exit;
    }
    header("Location: {$GLOBALS['SITE_URL']}signup.php?" . "name=" . urlencode($name) . "&email=" . urlencode($email) . "&email2=" . urlencode($email2) . "&uname=" . urlencode($uname) . "&url=" . urlencode($url) . "&err=" . urlencode($err));
    exit;
}
apply_template("Member Sign Up", array(array("name" => "Sign Up", "href" => "signup.php")));
if ($err) {
    print "<div class=error>" . htmlentities($err) . "</div>\n";
}
?>
<form id=signup_form method="post" action="<?php 
echo $GLOBALS["SECURE_URL"];
?>
signup.php">
<?php 
if ($url !== '') {
    ?>
<input type=hidden name=url value="<?php 
    echo htmlentities($url);
    ?>
">
Beispiel #13
0
*/
$srcdir = realpath(realpath(".") . "/..");
if (getenv("PATH_INFO")) {
    header("Content-type: application/octet-stream");
    if (getenv("PATH_INFO") === '/fossfactory-src-LIVE.tar.gz') {
        passthru("cd " . escapeshellarg($srcdir) . "; tar cz LICENSE contributors README source/ schema/ contrib/ " . "--transform 's,^,fossfactory-src/,' " . "--exclude .svn --exclude .git --owner root --group root");
    } else {
        if (ereg("^/[-._a-zA-Z0-9]+\$", getenv("PATH_INFO")) && is_file("{$srcdir}/releases" . getenv("PATH_INFO"))) {
            readfile("{$srcdir}/releases" . getenv("PATH_INFO"));
        } else {
            print "You're cool.";
        }
    }
    exit;
}
apply_template("FOSS Factory Source", array(array("name" => "FOSS Factory Source", "href" => "get-source.php")));
?>
<h1>FOSS Factory Source</h1>
<p>
The source code for this website is distributed under
the <a href="http://www.gnu.org/licenses/agpl.html">GNU
Affero General Public License</a>.
</p>

<?php 
// Get a list of the files in the releases directory
$releases = array();
if (is_dir("{$srcdir}/releases")) {
    $dir = opendir("{$srcdir}/releases");
    if ($dir !== false) {
        while (($file = readdir($dir)) !== false) {
Beispiel #14
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/>.
*/
// A quick sanity check
if (!isset($GLOBALS["SITE_URL"])) {
    print "<b>You forgot to configure the autoprepend setting.</b>\n";
    exit;
}
apply_template("The Team", array(array("name" => "The Team", "href" => "")), $onload, false, true);
?>
<h1>Introduction</h1>

<p>
The founding team of FOSS Factory has a history of successful business
start-ups in the IT industry.  Steve Sutherland, the lead investor,
met and hired John-Paul, the current president, back in 1994 to help
build TrueSpectra, an internet imaging and dynamic composition software
company.  TrueSpectra was rebranded as Scene7 and later bought out by
Adobe in 2007.
</p>

<p>
Steve and John-Paul left TrueSpectra in 1999 and immediately co-founded
OpenGraphics, a start-up that provides solutions for internet photo
Beispiel #15
0
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/>.
*/
$tab = scrub($_REQUEST["tab"]);
if (!$tab) {
    $tab = 'general';
}
apply_template("Feedback", array(array("name" => "Feedback", "href" => "feedback.php")));
?>
<h1>FOSS Factory Feedback</h1>
<p>
Please use these forums to discuss anything about the site.
You can also <a href="contact.php">contact us</a> by email or snail mail.
</p>
<?php 
include_once "tabs.php";
$tabs = array("general" => "General", "bugs" => "Bugs", "features" => "Feature Requests");
tab_header($tabs, "feedback.php", $tab, "general");
include_once "forum.php";
$forum = "feedback";
if ($tab != "general") {
    $forum .= "{$tab}";
}
Beispiel #16
0
function age($time)
{
    $now = time();
    $age = $now - $time;
    if ($time == 0 || $age < 0) {
        return "";
    }
    if ($age < 60) {
        return "{$age} seconds";
    }
    if ($age < 3600) {
        return round($age / 60) . " minutes";
    }
    return floor($age / 3600) . " hours, " . round($age % 3600 / 60) . " minutes";
}
apply_template("Administration", array(array("name" => "Administration", "href" => "admin.php")));
?>
<h1>Administration</h1>
<ul>
<li><a href="updateemail.php">Corporate News Updates</a></li>
</ul>

<h1>Test Scripts</h1>
<ul>
<li><a href="test-payout.php">Submission and Payout</a></li>
</ul>

<hr>
<p>
<a href="withdrawals.php">Manage the Withdrawal Queue</a>
</p>
Beispiel #17
0
if ($rc == 2) {
    print "No such project: {$id}";
    softexit();
}
include_once "formattext.php";
$onload = "";
if ($post) {
    list($rc, $postinfo) = ff_getpostinfo($post);
    if (!$rc) {
        $ancestry = $postinfo['ancestors'];
        $ancestry[] = $post;
        $ancestry = implode("/", $ancestry);
        $onload = "fold3('" . ($tab === 'submissions' ? 'subm' : 'reqmts') . "{$id}','{$ancestry}')";
    }
}
apply_template($projinfo["name"], array(array("name" => "Projects", "href" => "browse.php"), array("name" => $projinfo["name"], "href" => projurl($id))), $onload);
?>
<div class="relatedprojects">
<div class="sidenoteheader"><nobr>Related Projects</nobr></div>
<iframe class="relatedprojects" src="tree.php?p=<?php 
echo $id;
?>
"></iframe>
<?php 
if ($projinfo['status'] != 'complete') {
    ?>
    <ul id="options">
        <li class="first-child"><a href="newsubproject.php?p=<?php 
    echo $id;
    ?>
">Create a Subproject</a></li>
Beispiel #18
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/>.
*/
apply_template("Contact Us", array(array("name" => "Contact Us", "href" => "contact.php")), '', false, true);
?>
<h1>Contact Us</h1>

<p>
If you'd just like to provide comments or feedback, please use the <a href="feedback.php">feedback</a> forum.
</p>

<p>
<b>When sending email, please include the words "not spam" in the
subject line.</b>
</p>

<pre>
Email: support@fossfactory.org
Beispiel #19
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/>.
*/
// A quick sanity check
if (!isset($GLOBALS["SITE_URL"])) {
    print "<b>You forgot to configure the autoprepend setting.</b>\n";
    exit;
}
apply_template('Welcome to FOSS Factory', '', 'setup()', array("header-style", "intro-style", "featured-projects", "footer-style"));
?>
    <script>
     function login() {
        o=document.getElementById('login_form');
        s=document.getElementById('search_form');
        if(o.className=="closed") {
        //if sign up is not appearing, make it appear and hid search bar
            o.className="open";
            s.className="closed";
        }        
        else {
            o.className="closed";
            s.className="open";
        }
        return false;
Beispiel #20
0
        $basename = $parts[1];
        $attachments[] = array('filename' => $filename, 'pathname' => "{$tempdir}/{$basename}", 'description' => '');
    }
    $reqmts = trim($reqmts);
    $lead = "{$parent['lead']}";
    list($rc, $id) = ff_createproject($username, '', $reqmts, $p, $attachments, false, $priority, $lead, isset($_REQUEST["allotment"]) ? round($allotment * 10) : false);
    if (!$rc) {
        if ($username !== '') {
            al_createwatch("{$id}-news", $username);
        }
        header("Location: " . projurl($p, "tab=subprojects"));
        exit;
    }
    $err = $id;
}
apply_template("Report a Bug", array(array("name" => "Report a Bug", "href" => "newbug.php?p={$p}")));
if ($err) {
    print "<div class=error>" . htmlentities($err) . "</div>\n";
}
?>
<h1>Report a Bug</h1>
<script>
function checkAllot() {
    f = document.form;
    if (!f.elements['reqmts'].value.match(/[^ \n\r\t]/)) {
        alert('Please provide a description of the bug');
        return false;
    }

    return confirm('Really submit this bug report?  Please read everything over carefully before submitting.');
}
Beispiel #21
0
        $msg = "Sent test email";
    }
} else {
    if (isset($_REQUEST["send"])) {
        list($rc, $err) = al_sendnewsupdate($username, $subject, $body, false);
        if ($rc == 8) {
            $msg = "Some emails were not sent.  These weren't:<br>" . explode("<br>", $err);
        } else {
            if ($rc) {
                $msg = "Error sending real emails: {$rc} {$err}";
            }
        }
    }
}
list($rc, $count) = al_countwatches("news");
apply_template("Corporate News Updates", array(array("name" => "Corporate News Updates", "href" => "updateemail.php")));
?>
<h1>Corporate News Updates</h1>

<?php 
if ($msg) {
    print "<div class=error>{$msg}</div>";
}
?>

<p>
Use this form to send update emails to all members who are subscribed
to the updates mailing list.  You can use the following macros in the
body:
</p>
<ul>
Beispiel #22
0
        exit;
    }
    header("Location: dispute.php?id={$id}");
    exit;
}
list($rc, $disputeinfo) = ff_getdisputeinfo($id);
if ($rc) {
    print "Error getting dispute info: {$rc} {$disputeinfo}";
    exit;
}
list($rc, $projectinfo) = ff_getprojectinfo($disputeinfo["projectid"]);
if ($rc) {
    print "Error getting project info: {$rc} {$projectinfo}";
    exit;
}
apply_template("Dispute", array(array("name" => "Projects", "href" => "browse.php"), array("name" => $projectinfo["name"], "href" => projurl($disputeinfo["projectid"], $parent ? "#p{$parent}" : "")), array("name" => "Dispute", "href" => "dispute.php?id={$id}")));
?>
<table border=0 cellpadding=0 cellspacing=8>
    <tr><td valign=top width="0%"><b>Project:</b></td><td width="50%"><a href="<?php 
echo projurl($projectinfo["id"]);
?>
"><?php 
echo htmlentities($projectinfo["name"]);
?>
</a></td>
    <td width="50%" rowspan=4 valign=top>
        <p class="help">
<?php 
if ($GLOBALS["username"] === $disputeinfo["plaintiff"]) {
    ?>
        <b>Note:</b> This page tracks the complaint that you filed.  Every
Beispiel #23
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/>.
*/
$searchkeyword = scrub($_REQUEST['q']);
$sort = scrub($_REQUEST['sort']);
if ($_REQUEST['limit'] != '') {
    $limit = intval($_REQUEST['limit']);
}
if (isset($_REQUEST['offset'])) {
    $offset = intval($_REQUEST['offset']);
}
$id = scrub("{$_REQUEST['id']}");
$amount = "{$_REQUEST['amount']}";
apply_template("Browse Projects", array(array("name" => "Projects", "href" => "browse.php")), '', array('style', 'header-style', 'footer-style', 'browse-style'));
include_once "formattext.php";
?>
<h1>Browse Projects</h1>
<script src="folder.js"></script>
<script>
function set_showpoor() {
    document.getElementById('browse_table').className =
        document.getElementById('showpoor').checked ? '' : 'hidepoor';
}
</script>
<style>
#browse_table.hidepoor .nobounty {
    display: none;
}
</style>
Beispiel #24
0
function table_output($result, $item_class = '', $title = '', $level = 0)
{
    # template cache for detect previouse loaded template
    global $template_cache;
    # the local template cache is for detecting endless loops
    global $template_cache_local;
    # handling the local template cache
    #reseting it if level is 0
    if ($level == 0) {
        $template_cache_local = array();
    } elseif ($level == 20) {
        # this is a hardcoded loop stopper, should come into action, but prevents that the page will endless load
        # normaly there will never be templates on 20 level inherited
        return;
    }
    # output will catch the content until return
    $output = '';
    if (!empty($result)) {
        if (is_array($result) and !empty($result) and !empty($title)) {
            $output .= '<tr><td colspan=2><br>';
            if ($item_class == 'template_inheritance') {
                $output .= '<b>inherited from</b> ' . $title;
            } else {
                $output .= '<b>' . $title . '</b>';
            }
            $output .= '</td></tr>';
        }
        $last_fname = '';
        foreach ($result as $entry) {
            if (!empty($entry["config_class"]) and $entry["config_class"] == "service") {
                $host_query = 'SELECT attr_value AS hostname
                                      FROM ConfigValues,ConfigAttrs,ConfigClasses,ItemLinks
                                      WHERE fk_item_linked2=ConfigValues.fk_id_item
                                          AND id_attr=ConfigValues.fk_id_attr
                                          AND naming_attr="yes"
                                          AND fk_id_class = id_class
                                          AND config_class="host"
                                          AND ItemLinks.fk_id_item=' . $entry["item_id"];
                $hostname = db_handler($host_query, "getOne", "Get linked hostnames (if service)");
            }
            if (!empty($entry["friendly_name"])) {
                $group_name = $entry["friendly_name"];
            }
            // group same attributes
            if (!empty($group_name) and $last_fname != $group_name) {
                $show_fname = $group_name;
                //$bgcolor = 'class="color_list2"';
            } else {
                $show_fname = '';
            }
            $output .= '<tr>';
            //$output .= '<td '.$bgcolor.'>'.$show_fname.'</td>';
            $output .= '<td class="color_list2">' . $show_fname . '</td>';
            # print template (and detect repetitive)
            if ($item_class == 'template_inheritance') {
                $template_status = apply_template($template_cache, $entry["item_id"]);
                $local_template_status = apply_template($template_cache_local, $entry["item_id"]);
                NConf_DEBUG::set($local_template_status, 'DEBUG', "local repetitive status");
                NConf_DEBUG::set($template_cache_local, 'DEBUG', "local template cache");
            } else {
                $template_status = FALSE;
                $local_template_status = FALSE;
            }
            if (!empty($entry["config_class"]) and $entry["config_class"] == "service" && $item_class != "host") {
                $output .= '<td class="color_list1 highlight">';
                $output .= '<a href="detail.php?id=' . $entry["item_id"] . '">';
                $output .= $hostname . ': ' . $entry["attr_value"];
                $output .= '</td>';
            } else {
                $level_label = '';
                for ($i = $level; $i > 1; $i--) {
                    $level_label .= '<div style="width: 9px; display: inline-block;"></div>';
                }
                if ($i == 1 and $level != 0) {
                    ## add a mark
                    $level_label .= '<span class="link_with_tag2"></span>';
                }
                # mark previously applied templates
                if ($template_status === "repetitive") {
                    # detect previously applied or template loop
                    if ($local_template_status === "repetitive") {
                        # endless loop
                        $repetitive_text = "(circular template chain detected)";
                        $class = "ui-state-error highlight";
                    } else {
                        $repetitive_text = "(previously applied)";
                        $class = "color_list1 highlight";
                    }
                    $output .= '<td class="' . $class . '">';
                    $output .= $level_label . '<a href="detail.php?id=' . $entry["item_id"] . '">';
                    $output .= $entry["attr_value"] . '</a>';
                    $output .= '<span id="' . $entry["item_id"] . '" class="previously_applied" style="float: right;"><i>' . $repetitive_text . '</i></span>';
                    $output .= '</td>';
                } else {
                    # set id for coming repetitive
                    if ($item_class == 'template_inheritance') {
                        $output .= '<td id="' . $entry["item_id"] . '_first" class="color_list1 highlight">';
                    } else {
                        $output .= '<td class="color_list1 highlight">';
                    }
                    if (!empty($entry["item_id"])) {
                        $output .= $level_label;
                        $output .= '<a href="detail.php?id=' . $entry["item_id"] . '">';
                        $output .= $entry["attr_value"] . '</a>';
                    } else {
                        $output .= $entry["attr_value"];
                    }
                    $output .= '</td>';
                }
            }
            $output .= '</tr>';
            if (!empty($group_name)) {
                $last_fname = $group_name;
                $show_fname = '';
                $bgcolor = '';
            }
            # lookup template himself
            if ($item_class == 'template_inheritance') {
                if ($local_template_status === "repetitive") {
                    NConf_DEBUG::set('', 'DEBUG', 'template is repetitive, stopping inheritance to prevent endless loop');
                } else {
                    $template_on_template = db_templates("template_inheritance_direct", $entry["item_id"]);
                    if (!empty($template_on_template)) {
                        //$output .= '<tr><td colspan=2><br><b>directly linked to service</b></td></tr>';
                        $output .= table_output($template_on_template, 'template_inheritance', '', ++$level);
                    }
                }
            }
        }
    }
    return $output;
}
Beispiel #25
0
            continue;
        }
        $basename = $parts[1];
        $attachments[] = array('filename' => $filename, 'pathname' => "{$tempdir}/{$basename}", 'description' => '');
    }
    $reqmts = trim($reqmts);
    $lead = $_REQUEST["makemelead"] ? $username : ($parent['lead'] ? $parent['lead'] : '');
    list($rc, $id) = ff_createproject($username, $name, $reqmts, $p, $attachments, false, 'subproject', $lead, isset($_REQUEST["allotment"]) ? round(floatval($_REQUEST["allotment"]) * 10) : false);
    if (!$rc) {
        ff_setfundinggoal($username, $id, (int) ($fundgoal * 100) . $GLOBALS['pref_currency']);
        header("Location: " . projurl($id));
        exit;
    }
    $err = $id;
}
apply_template("New Project", array(array("name" => "New Project", "href" => "newsubproject.php?p={$p}")));
if ($err) {
    print "<div class=error>" . htmlentities($err) . "</div>\n";
}
?>
<h1>Create a New Subproject</h1>
<?php 
if ($username == '') {
    ?>
<p class="note">
You are not currently logged in!  If you want to be
the initial lead for this project, then you should
<a href="login.php?url=<?php 
    echo urlencode("newsubproject.php?p={$p}");
    ?>
">log
Beispiel #26
0
        }
    }
    if (!$err) {
        $err = "Success";
        // Log the person in
        include_once "loginlogic.php";
        list($rc, $err) = log_in($u, $sid);
        if (!$rc) {
            header("Location: {$GLOBALS['SITE_URL']}resetpwd.php?u=" . urlencode($u) . "&err=Success");
            exit;
        }
    }
    header("Location: {$GLOBALS['SECURE_URL']}resetpwd.php?u=" . urlencode($u) . "&c=" . urlencode($c) . "&err=" . urlencode($err));
    exit;
}
apply_template("Password Reset", array(array("name" => "Password Reset", "href" => "{$GLOBALS['SECURE_URL']}resetpwd.php?u=" . urlencode($u) . "&c=" . urlencode($c))));
if ($err === "Success") {
    ?>
<p>
Your password has been successfully reset.
</p>
<a href="account.php">Continue</a>
<?php 
    softexit();
}
if ($err) {
    print "<div class=error>" . htmlentities($err) . "</div>\n";
}
?>
<p>
Please enter your new password.  Make sure to type it exactly the same
Beispiel #27
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/>.
*/
apply_template("Privacy Policy", array(array("name" => "Privacy Policy", "href" => "terms.php")), '', false, true);
?>
<h1>FOSS Factory Inc. Privacy Policy</h1>

<h2>Table of contents</h2>

<ol>
<li><a href="#introduction">Introduction</a></li>
<li><a href="#applicability">Applicability</a></li>
<li><a href="#purpose">Purpose of Collection</a></li>
<li><a href="#consent">Consent</a></li>
<li><a href="#disclosure">Disclosure</a></li>
<li><a href="#cookies">Cookies</a></li>
<li><a href="#forums">Forums</a></li>
<li><a href="#thirdparties">Third Party Sites</a></li>
<li><a href="#security">Security and Access</a></li>
Beispiel #28
0
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/>.
*/
if ($auth !== 'admin') {
    print "Not Authorized.";
    exit;
}
if (isset($_REQUEST["fromy"])) {
    $from = mktime(0, 0, 0, intval($_REQUEST["fromm"]), 1, intval($_REQUEST["fromy"]));
    $to = mktime(0, 0, 0, intval($_REQUEST["tom"]) + 1, 1, intval($_REQUEST["toy"]));
} else {
    $now = time();
    $from = mktime(0, 0, 0, date("m", $now), 1, date("Y", $now));
    $to = mktime(0, 0, 0, date("m", $now) + 1, 1, date("Y", $now));
}
apply_template("Bookkeeping", array(array("name" => "Administration", "href" => "admin.php"), array("name" => "Bookkeeping", "href" => "bookkeeping.php")));
function admin_gettransactionreport($from = false, $to = false)
{
    $qu = sql_exec("select regexp_replace(account,':.*','') as acct," . "sum_money(change) from transaction_log " . ($from === false && $to === false ? "" : "where true ") . ($from === false ? "" : "and time >= " . intval($from) . " ") . ($to === false ? "" : "and time < " . intval($to) . " ") . "group by acct order by acct");
    if ($qu === false) {
        return private_dberr();
    }
    $report = array();
    for ($i = 0; $i < sql_numrows($qu); $i++) {
        $row = sql_fetch_array($qu, $i);
        $report["{$row['acct']}"] = "{$row['sum_money']}";
    }
    return array(0, $report);
}
function admin_getpaypaltransactions($currency = false, $from = false, $to = false)
{
Beispiel #29
0
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/>.
*/
$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);
?>
Beispiel #30
0
        exit;
    }
    header("Location: arbitration.php");
    exit;
}
if ($_REQUEST["relinquish"]) {
    $dispute = scrub($_REQUEST["id"]);
    list($rc, $err) = ff_unassigndispute($dispute);
    if ($rc) {
        print "Error: {$rc} {$err}";
        exit;
    }
    header("Location: arbitration.php");
    exit;
}
apply_template("Arbitration", array(array("name" => "Arbitration", "href" => "arbitration.php")));
list($rc, $disputes) = ff_getactivedisputes();
if ($rc) {
    print "Error: {$rc} {$disputes}";
    softexit();
}
if (sizeof($disputes) == 0) {
    print "There are no active disputes.";
    softexit();
}
?>
<h1>Active Disputes</h1>

<table border=1 cellspacing=0 cellpadding=3><tr>
<th>Assigned To</th>
<th>Project</th>