Esempio n. 1
0
function printAllVendors()
{
    $_db = getMysqli();
    $_stmt = $_db->prepare("SELECT VendorName, VendorID FROM Vendors");
    $_stmt->execute();
    $_stmt->bind_result($s_VendorName, $i_VendorID);
    while ($_stmt->fetch()) {
        $_value = "<tr>\n                <td>\n                  " . $s_VendorName . "\n                </td>\n                <td>";
        if (canEditVendors()) {
            $_value = $_value . "<a href='./vendor.php?reason=edit&vid=" . $i_VendorID . "' class='btn btn-info' role='button'><span class='glyphicon glyphicon-pencil'></span> Update/Change</a> ";
        }
        $_value = $_value . "<a href='./vendor.php?reason=view&vid=" . $i_VendorID . "' 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();
}
Esempio n. 2
0
        </div>
      </div>
    <?php 
}
?>

    <!-- Manage Vendors -->
    <?php 
if (canViewVendors()) {
    ?>
      <div class="container">
        <div class="well">
          <H3>Manage Vendors</H3>
          <?php 
    if (canEditVendors()) {
        ?>
            <a href="./vendor.php?reason=add" class="btn btn-success" role="button"><span class="glyphicon glyphicon-plus"></span> Add a new Vendor</a>
          <?php 
    }
    ?>
          <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()) {