Skip to content

Commit

Permalink
QueryList QueryView ui fixes (#1747)
Browse files Browse the repository at this point in the history
* QueryView ui fixes

form, table, query info fixes #1411

* QueryList.php ui fixes

#1411

* coding style fixes

* StyleCI fixes

* StyleCI fixes
  • Loading branch information
Adnan0703 authored and DawoudIO committed Feb 11, 2017
1 parent 9cfea0c commit faf4422
Show file tree
Hide file tree
Showing 2 changed files with 193 additions and 160 deletions.
51 changes: 34 additions & 17 deletions src/QueryList.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,39 @@

require 'Include/Header.php';

if ($_SESSION['bAdmin']) {
echo '<p align="center"><a href="QuerySQL.php">'.gettext('Run a Free-Text Query').'</a></p>';
}

while ($aRow = mysqli_fetch_array($rsQueries)) {
extract($aRow);

// Filter out finance-related queries if the user doesn't have finance permissions
if ($_SESSION['bFinance'] || !in_array($qry_ID, $aFinanceQueries)) {
// Display the query name and description
echo '<p>';
echo '<a href="QueryView.php?QueryID='.$qry_ID.'">'.gettext($qry_Name).'</a>';
echo '<br>';
echo gettext($qry_Description);
echo '</p>';
}
}
?>
<div class="box box-primary">
<div class="box-body">
<p class="text-right">
<?php
if ($_SESSION['bAdmin']) {
echo '<a href="QuerySQL.php" class="text-red">'.gettext('Run a Free-Text Query').'</a>';
}
?>
</p>

<ul>
<?php while ($aRow = mysqli_fetch_array($rsQueries)): ?>
<li>
<p>
<?php
extract($aRow);

// Filter out finance-related queries if the user doesn't have finance permissions
if ($_SESSION['bFinance'] || !in_array($qry_ID, $aFinanceQueries)) {
// Display the query name and description
echo '<a href="QueryView.php?QueryID='.$qry_ID.'">'.gettext($qry_Name).'</a>:';
echo '<br>';
echo gettext($qry_Description);
}
?>
</p>
</li>
<?php endwhile; ?>
</ul>
</div>

</div>
<?php

require 'Include/Footer.php';
Loading

0 comments on commit faf4422

Please sign in to comment.