-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
165 lines (154 loc) · 5.22 KB
/
index.php
File metadata and controls
165 lines (154 loc) · 5.22 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php
include_once 'db_config.php';
?>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<title>Generic Query Builder</title>
<link rel="shortcut icon" href="../favicon.ico" />
<link rel="stylesheet" type="text/css"
href="css/jquery-ui-1.9.2.custom.min.css" />
<link rel="stylesheet" type="text/css" href="css/mhs.css" />
<!-- <link rel="stylesheet" type="text/css"
href="bower_components/simple-map-d3/dist/simple-map-d3.css"> -->
<script type="text/javascript" src="js/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.9.2.custom.min.js"></script>
<script type="text/javascript" src="js/mhs.js"></script>
<script type="text/javascript" src="js/d3.v3.min.js"></script>
<!-- <script type="text/javascript"
src="http://maps.google.com/maps/api/js?sensor=true"></script> -->
<!-- <script type="text/javascript"
src="http://mbostock.github.com/d3/d3.js?1.29.1"></script> -->
<!-- <script src="http://d3js.org/topojson.v1.min.js"></script>
<script src="http://d3js.org/queue.v1.min.js"></script> -->
<script src="bower_components/simple-map-d3/dist/simple-map-d3.js"
charset="utf-8"></script>
</head>
<body height="100%">
<div>
<span style="font-size: 120%"> <!-- <img src="img/logo_multicare.jpg"/> -->QUERY
BUILDER | EDUCATIONAL DATA
</span> <span style="position: absolute; right: 10px"><img
src="img/Ctr.Web.Data.Sci_uw_Inst.Tech.png" /> </span>
</div>
<div style="width: 100%; text-align: right">
<a href="#" class="systemLinks">My Account</a> <a href="#"
class="systemLinks">Log Out</a>
</div>
<br />
<div style="height: 100%">
<div id="leftColumn">
<div id="fieldInfo">
<span>Visualization Options:</span>
<p>Field:</p>
<input id="fieldTextBox" type="text" disabled="disabled" value=""></input>
<p>Type:</p>
<input id="typeTextBox" type="text" disabled="disabled" value=""></input>
<br></br>
<button id="editField" style="font-size: 110%">Change</button>
<br></br>
</div>
<div id="fieldList">
<?php
$tablesSchema = execute("select * from information_schema.columns where table_schema = '$DBName' order by table_name,ordinal_position");
?>
<ul>
<?php
$currentTable = "";
$oldTable = "";
$title = "";
$ui = "";
?>
<?php foreach ($tablesSchema as $row): ?>
<?php
// if ($row['ORDINAL_POSITION'] == 1) {
// continue;
// }
$oldTable = $currentTable;
$currentTable = $row['TABLE_NAME'];
$title = "<div>" . $oldTable . "</div>";
if ($currentTable != $oldTable && $oldTable != "") {
//HTML Will print
echo "<li>$title<ul>$ui</ul><li>";
$ui = "<li name='" . $row['TABLE_NAME'] . "~" . $row['COLUMN_NAME'] . "'>" . $row['COLUMN_NAME'] . "</li>";
} else {
$ui.= "<li name='" . $row['TABLE_NAME'] . "~" . $row['COLUMN_NAME'] . "'>" . $row['COLUMN_NAME'] . "</li>";
}
?>
<?php endforeach; ?>
<?php echo "<li>$title<ul>$ui</ul><li>"; ?>
</ul>
</div>
<hr class="panelbreak" />
</div>
<div id="rightContent">
<div id="tabs">
<ul>
<li><a href="#tabs-1">Visualization Area</a></li>
</ul>
<div id="tabs-1">
<div id="dropContainer" style="width: 35%" class="dashed container">
<div class="label">Drag "Where Clause" Fields Here</div>
<ul id="drop">
</ul>
</div>
<div id="stats" style="width: 60%" class="dashed stats">
<div style="clear: both"></div>
</div>
</div>
</div>
</div>
<div style="clear: both"></div>
</div>
<div id="dialog" title="Select Join Field">
<div id="possibleJoinFields"></div>
</div>
</body>
<!-- <div class="mark">
<img src="img/settings.png" />
</div> -->
<div id="options">
<div>
<img onclick="toggleOptions()" style="cursor: pointer;"
src="img/exit-icon.png" />
</div>
<table class="options_table">
<tr>
<td>Visualization Field:</td>
</tr>
<tr>
<td><select id="chooseField" name="chooseField"
onchange="updateVisualizationField(this)">
<?php
$strSQL = "SELECT DISTINCT(COLUMN_NAME) FROM INFORMATION_SCHEMA.`COLUMNS` WHERE table_schema='$DBName';";
$result = execute($strSQL);
sort($result);
?>
<option selected="selected">Select Visualization Field</option>
<?php foreach ($result as $row):
if ($row["COLUMN_NAME"] == "Met AYP" || $row["COLUMN_NAME"] == "Met") {
$tmp = $row["COLUMN_NAME"];
}
?>
<option value=<?php echo $row["COLUMN_NAME"]; ?>><?php echo $row["COLUMN_NAME"]; ?></option>
<?php endforeach; ?>
</select>
</td>
</tr>
<!-- <tr>
<td>Visualization Type:</td>
</tr>
<tr>
<td><select id="chooseType" name="chooseType"
onchange="updateVisualizationType(this)">
<option>Pie Chart</option>
<option selected>Bar Chart</option>
<option>Map</option>
</select>
</td>
</tr> -->
</table>
</div>
</html>