Ejemplo n.º 1
0
function printAllFunds()
{
    $_db = getMysqli();
    if (canEditFunds()) {
        $_stmt = $_db->prepare("SELECT FundName, FundID, Balance, Timestamp FROM Funds");
    } else {
        $_stmt = $_db->prepare("SELECT FundName, FundID, Balance, Timestamp FROM Funds WHERE Active=1");
    }
    $_stmt->execute();
    $_stmt->bind_result($s_FundName, $i_FundID, $s_Balance, $s_Timestamp);
    while ($_stmt->fetch()) {
        $_value = "<tr>\n                <td>" . $s_FundName . "</td>\n                <td>" . $s_Balance . "</td>\n                <td>" . $s_Timestamp . "</td>\n                <td>";
        if (canEditFunds()) {
            $_value = $_value . "<a href='./fund.php?reason=edit&fid=" . $i_FundID . "' class='btn btn-info' role='button'><span class='glyphicon glyphicon-pencil'></span> Update/Change</a> ";
        }
        $_value = $_value . "<a href='./fund.php?reason=view&fid=" . $i_FundID . "' class='btn btn-primary' role='button'><span class='glyphicon glyphicon-search'></span> View</a>";
        $_value = $_value . "</td></tr>";
        echo $_value;
    }
    $_stmt->free_result();
    $_db->close();
}
Ejemplo n.º 2
0
    ?>
          <a href="./vendor.php?reason=list" class="btn btn-primary" role="button"><span class="glyphicon glyphicon-list-alt"></span> View all Vendors</a>
        </div>
      </div>
    <?php 
}
?>

    <!-- Manage Funds -->
    <?php 
if (canViewFunds()) {
    ?>
      <div class="container">
        <div class="well">
          <H3>Manage Funds</H3>
          <?php 
    if (canEditFunds()) {
        ?>
            <a href="./fund.php?reason=add" class="btn btn-success" role="button"><span class="glyphicon glyphicon-plus"></span> Add a new Fund</a>
          <?php 
    }
    ?>
          <a href="./fund.php?reason=list" class="btn btn-primary" role="button"><span class="glyphicon glyphicon-list-alt"></span> View all Funds</a>
        </div>
      </div>
    <?php 
}
?>
    </body>
 </html>