fully off of pure and now on bootstrap. still needs tweaking but overall in the same or better position than we were on pure...

This commit is contained in:
2017-05-12 00:38:26 -04:00
parent 0084a916b8
commit fa6238997c
8 changed files with 37 additions and 84 deletions

View File

@@ -11,13 +11,18 @@ else: ?>
<!-- ********** BEGIN CONTENT ********** -->
<?php if ($session_user["0"]["usertype"] == "Administrator"): ?>
<h2 class="content-subhead"><i class="fa fa-history"></i> Historical Reports</h2>
<p>The drop-down below can be used to select pre-configured reports. Other reports are currently being written.</p>
<form class="pure-form pure-form-stacked" action="reports.php" method="post">
<div class="container">
<div class="page-header">
<h2><i class="glyphicon glyphicon-calendar"></i> <?php echo lang('REPORTS'); ?></h2>
</div>
<p class="lead"><?php echo lang('REPORTS_DESC'); ?></p>
<form action="reports.php" method="post">
<fieldset>
<div class="pure-g">
<div class="pure-u-1 pure-u-md-1-2">
<select name="reporttype" class="pure-input-1-2">
<div class="form-group row">
<div class="col-sm-6">
<select name="reporttype" class="form-control">
<?php if (isset($_POST['reporttype'])): ?>
<option value="<?php echo $_POST['reporttype']; ?>" placeholder="Report Type"><?php echo $_POST['reporttype']; ?></option>
<option>----------</option>
@@ -29,8 +34,8 @@ else: ?>
<option value="All Punches">All Punches</option>
</select>
</div>
<div class="pure-u-1 pure-u-md-1-2">
<button type="submit" class="pure-button button-success pure-input-1-2"><i class="fa fa-play-circle"></i></button>
<div class="col-sm-6">
<button type="submit" class="form-control btn btn-block btn-primary"><i class="glyphicon glyphicon-play"></i> Run Report</button>
</div>
</div>
</fieldset>
@@ -38,21 +43,21 @@ else: ?>
<?php if (isset($_POST['reporttype'])): ?>
<?php if ($_POST['reporttype'] == "Hours per week per user"): ?><table class="pure-table pure-table-striped">
<?php if ($_POST['reporttype'] == "Hours per week per user"): ?><table class="table table-striped">
<thead><tr><th>Year</th><th>Week#</th><th>Name</th><th>Hours</th></tr></thead>
<tbody><?php foreach (reportWeeklyByUser($yaptc_db) as $row): ?>
<tr><td><?php echo $row['g_year']; ?></td><td><?php echo $row['g_week']; ?></td><td><?php echo $row['lastname'] . ", " . $row['firstname']; ?></td><td><?php echo $row['punchhours']; ?></td></tr><?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
<?php if ($_POST['reporttype'] == "Hours per month per user"): ?><table class="pure-table pure-table-striped">
<?php if ($_POST['reporttype'] == "Hours per month per user"): ?><table class="table table-striped">
<thead><tr><th>Year</th><th>Month</th><th>Name</th><th>Hours</th></tr></thead>
<tbody><?php foreach (reportMonthlyByUser($yaptc_db) as $row): ?>
<tr><td><?php echo $row['g_year']; ?></td><td><?php echo $row['g_month']; ?></td><td><?php echo $row['lastname'] . ", " . $row['firstname']; ?></td><td><?php echo $row['punchhours']; ?></td></tr><?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
<?php if ($_POST['reporttype'] == "All Punches"): ?><table class="pure-table pure-table-striped">
<?php if ($_POST['reporttype'] == "All Punches"): ?><table class="table table-striped">
<thead><tr><th>In</th><th>Out</th><th>Name</th><th>Hours</th><th>Flagged</th><th>Notes</th></tr></thead>
<tbody><?php foreach (listPunches($yaptc_db, "%") as $row): ?>
<tr><td><?php echo $row['intime']; ?></td><td><?php echo $row['outtime']; ?></td><td><?php echo $row['lastname'] . ", " . $row['firstname']; ?></td><td><?php echo $row['punchhours']; ?></td><td><?php echo $row['modified']; ?></td><td><?php echo $row['notes']; ?></td></tr><?php endforeach; ?>
@@ -62,6 +67,7 @@ else: ?>
<?php else: ?>
<p>No query to display. Please select from the dropdown above...</p>
<?php endif; ?>
</div>
<?php else: ?>
<h2 class="content-subhead">NOT AUTHORIZED!</h2>
<?php endif; ?>