Example #1
0
function printFundsTable()
{
    global $_pinkie;
    if (count($_pinkie->a_Expenses) == 0) {
        echo '<tr>
            <td>No Funds attached to this Pinkie!</td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            </tr>';
        return;
    }
    $_fund = 0;
    foreach ($_pinkie->a_Expenses as $_e) {
        $_fund = new Fund();
        $_fund->i_FundID = $_e->f_FundID;
        $_fund->fromDatabase();
        printf('<tr>
                    <td>%s</td>
                    <td>$%.2f</td>
                    <td>%s</td>
                    <td>%s</td>
                    <td>%s</td>
                    <td>%s</td>
                    <td>%s</td>
                    <td>$%.2f</td>
                  </tr>', $_fund->s_FundName, $_e->d_Amount, $_fund->s_Activity, $_fund->s_Fund, $_fund->s_Function, $_fund->s_CostCenter, $_fund->s_ProjectCode, $_fund->s_Balance);
    }
}
Example #2
0
function printFundsTable()
{
    global $_pinkie;
    if (count($_pinkie->a_Expenses) == 0) {
        echo '<tr>
            <td>No Funds attached to this Pinkie!</td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            </tr>';
        return;
    }
    $_fund = 0;
    foreach ($_pinkie->a_Expenses as $_e) {
        $_fund = new Fund();
        $_fund->i_FundID = $_e->f_FundID;
        $_fund->fromDatabase();
        printf('<tr id="%s" amt="%s" fname="%s">
                    <td>%s</td>
                    <td>$%.2f</td>
                    <td>%s</td>
                    <td>%s</td>
                    <td>%s</td>
                    <td>%s</td>
                    <td>%s</td>
                    <td>$%.2f</td>
                  </tr>', $_e->i_ExpenseID, $_e->d_Amount, $_fund->s_FundName, $_fund->s_FundName, $_e->d_Amount, $_fund->s_Activity, $_fund->s_Fund, $_fund->s_Function, $_fund->s_CostCenter, $_fund->s_ProjectCode, $_fund->s_Balance);
        // printf('<input type="hidden" id="expenseID[]" name="expenseID" value="%s">', $_e->i_ExpenseID);
        // printf('<input type="hidden" id="fund[]" value="%s">', $_e->f_FundID);
        // printf('<input type="hidden" id="amount[]" value="%s">', $_e->d_Amount);
    }
}
Example #3
0
</html>

<?php 
} elseif ($s_reason == 'view') {
    // ---------------------------------------------------------------------------
    // The user can view all the variables associated with a single Fund.
    // ---------------------------------------------------------------------------
    // Error catching.
    if (!isset($_GET['fid'])) {
        header("Location: ./fund.php?reason=list");
    }
    // Get the Funds
    $_fid = $_GET['fid'];
    $_fund = new Fund();
    $_fund->i_FundID = $_fid;
    $_fund->fromDatabase();
    ?>

<!DOCTYPE html>
<html>
   <head>
     <?php 
    printHeaderInfo();
    ?>
     <title>ePinkies2 Fund</title>
     <script type="text/javascript" src="js/functions.js"></script>
     <script type="text/javascript" src="js/fund.js"></script>
   </head>

   <body>