-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparamListResult.php
More file actions
80 lines (80 loc) · 2.04 KB
/
paramListResult.php
File metadata and controls
80 lines (80 loc) · 2.04 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<html>
<head>
<title>Param List Result</title>
<?php
include('config.php');
include_once('auditTrial.php');
session_start();
include('layoutjscss.php');
?>
</head>
<body>
<div class="ui-layout-north">
<?php
include('header.php');
?>
</div>
<div class="ui-layout-west">
<?php
include('paramListForm.php');
?>
</div>
<div class="ui-layout-center">
<?php
if($_SERVER["REQUEST_METHOD"] == "POST") {
$formname=addslashes($_POST['formname']);
if ($formname=="paramListForm") {
$variable=addslashes($_POST['variable']);
if (strlen($variable)) {
// format the sql statement using the variable of the form
$sql="SELECT pVariable, pValue, pDescription FROM tParameter WHERE pVariable LIKE '%$variable%'";
} else {
$sql="SELECT pVariable, pValue, pDescription FROM tParameter";
}
$result=mysql_query($sql);
if (mysql_num_rows($result) > 0) {
// format the form
echo "<meta http-equiv=\"Content-type\" content=\"text/html; charset=utf-8\">";
echo "<link rel=\"stylesheet\" href=\"libs/css/astlogger.css\">";
echo "<table width=\"100%\" border=\"1\" >";
echo "<tr>";
echo "<th>pVariable</th><th>pValue</th><th>pDescription</th>";
echo "</tr>";
while($row = mysql_fetch_array($result)){
$variable = $row['pVariable'];
$value = $row['pValue'];
$description = $row['pDescription'];
echo "<tr>";
echo "<td>";
echo $variable;
echo "</td>";
echo "<td>";
echo $value;
echo "</td>";
echo "<td>";
echo $description;
echo "</td>";
echo "</tr>";
// blank line
echo "<tr>";
echo "</tr>";
}
echo "</table>";
echo "</form>";
$variable=addslashes($_POST['variable']);
if (strlen($variable)) {
// audit trial
$auditTrial = "list parameter like $variable successfully.";
insertAuditTrial($auditTrial);
} else {
// audit trial
$auditTrial = "list all parameter successfully.";
insertAuditTrial($auditTrial);
}
}
}
}
?>
</div>
</body>
</html>