-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathQueryList.php
54 lines (43 loc) · 1.47 KB
/
QueryList.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
/*******************************************************************************
*
* filename : QueryList.php
* last change : 2003-01-07
* website : http://www.infocentral.org
* copyright : Copyright 2001, 2002 Deane Barker
*
* InfoCentral is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
******************************************************************************/
//Include the function library
require "Include/Config.php";
require "Include/Functions.php";
//Set the page title
$sPageTitle = gettext("Query Listing");
$sSQL = "SELECT * FROM query_qry ORDER BY qry_Name";
$rsQueries = RunQuery($sSQL);
$aFinanceQueries = explode(',', $aFinanceQueries);
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 = mysql_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 . "\">" . $qry_Name . "</a>";
echo "<br>";
echo $qry_Description;
echo "</p>";
}
}
require "Include/Footer.php";
?>