Esempio n. 1
0
function canEdit()
{
    if (isset($_SESSION['user']['role'])) {
        if ($_SESSION['user']['role'] == "admin" || $_SESSION['user']['role'] == "org" && !isDoneAllocating()) {
            return true;
        } else {
            return false;
        }
    } else {
        return false;
    }
}
    echo $expenditure['expend_id'];
    ?>
" id="expend_price_quote_second" class="detail <?php 
    if (canEdit()) {
        echo 'editable-input';
    }
    ?>
"><?php 
    if ($expenditure['second_source']) {
        echo $expenditure['second_source'];
    }
    ?>
</span></p>

          <?php 
    if (isDoneAllocating() || isFinanceCommittee()) {
        ?>

          <hr>

          <p><span class="detail-heading">Allocation Amount</span><br>$<span number="<?php 
        echo $expenditure['expend_id'];
        ?>
" id="expend_allocation" class="detail <?php 
        if (isAdmin()) {
            echo 'editable-input';
        }
        ?>
"><?php 
        if ($expenditure['allocated']) {
            echo $expenditure['allocated'];
Esempio n. 3
0
require "include/nav-sidebar.php";
?>

    <?php 
require "include/analytics/header.php";
?>

    <div class="main" style="margin-left: 0;">
      <div class="content" style="padding-top: 4em;">
        <div class="content-area">
          <div class="grid">
            <div class="tile desktop-12 tablet-12">
              <h1>Analytics</h1>
            </div>
            <?php 
if (isDoneAllocating()) {
    ?>
              <?php 
    if (isset($_SESSION['viewing_user_id']) && (!isFinanceCommittee() || isFinanceCommittee() && $_SESSION['viewing_user_id'] != $_SESSION['user']['id'])) {
        require "include/analytics/individual.php";
    } else {
        if (isLoggedIn()) {
            ?>
                        <div class="tile desktop-12 tablet-12">
                          <h1>Cannot View Organization Analytics</h1>
                          <hr>
                          <p>Please select an org to get its organizational analytics.</p>
                        </div>
              <?php 
        } else {
            ?>