</li>

						</ul>

						<!-- The left navigation -->
						<nav id ="navigation">
							<span class="dashboard"><a class ="link" id="first-link" href ="../admin/dashboard.php?module=overview" title = "View an overview of the system"><i class="fa fa-home fa-fw"></i> Dashboard</a></span>
							<header class="navCategory navIssues">Issues<i class="fa fa-toggle-on"></i></header>

							<?php 
if ($role == "Administrator" || $role == "Miami") {
    echo '<span class="issues"><a class ="link" href="#" id="newissue" title = "Create a new issue"><i class="fa fa-bug fa-fw"></i> Create an issue</a></span>';
}
?>
							<span class="issues"><a class ="link" id="viewIssues" href="../includes/allpackages.php"  title = "View a list of all Packages with issues"><i class="fa fa-eye fa-fw"></i> View all issues <span class="numberOfIssues"><?php 
echo countTotalAvailableIssues();
?>
</span></a></span>


							<header class="navCategory navPackages">Packages<i class="fa fa-toggle-on"></i></header>
							<span class="packages"><a class ="link" href ="../admin/dashboard.php?module=search" id="searchNav" title = "Search for any package data"><i class="fa fa-search fa-fw"></i> Find a package</a></span>

							<?php 
if ($role == "Administrator" || $role == "Miami") {
    echo '<span class="packages"><a class ="link" href ="#" id="initialPackageScan" title = "Perform an initial package scan"><i class="fa fa-qrcode fa-fw"></i> Initial package scan</a></span>';
    // echo '<span class="packages"><a class ="link" href="../includes/allpackagescans.php"  title = "A list of all scanned packages"><i class="fa fa-eye fa-fw"></i> View Package scans</a></span>';
}
?>

							<header class="navCategory navUsers">User<i class="fa fa-toggle-on"></i></header>
示例#2
0
    $resolved = 'No';
    // Build the query
    $sql = "SELECT * FROM packages WHERE Resolved = :resolved AND PackageID IN(SELECT PackageID FROM hiddenissues WHERE HideFromCountry = :country)";
    //prepare the sql statement
    $stmt = $connection->prepare($sql);
    $stmt->setFetchMode(PDO::FETCH_OBJ);
    $stmt->bindParam(':country', $country, PDO::PARAM_STR);
    $stmt->bindParam(':resolved', $resolved, PDO::PARAM_STR);
    //execute the prepared statement
    $stmt->execute();
    $total = $stmt->rowCount();
    if ($total == 0) {
        return 0;
    } else {
        return $total;
    }
}
$totalAvailable = countTotalAvailableIssues();
$totalHidden = countTotalHidden();
// $total = countTotalIssues();
$cols = array();
// create an empty array to hold the column values
$rows = array();
// create an empty array to hold the row values
$cols = array(array('id' => '', 'label' => 'Issues', 'type' => 'string'), array('id' => '', 'label' => 'Count', 'type' => 'number'));
// Values
$rows[] = array('c' => array(array('v' => 'Available Issues'), array('v' => (int) $totalAvailable)));
$rows[] = array('c' => array(array('v' => 'Hidden Issues'), array('v' => (int) $totalHidden)));
$table = array('cols' => $cols, 'rows' => $rows);
$jsonTable = json_encode($table, true);
echo $jsonTable;