forked from kkaiser1952/NCM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfindReports.php
254 lines (197 loc) · 6.62 KB
/
findReports.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
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
<!doctype html>
<?php
ini_set('display_errors',1);
error_reporting (E_ALL ^ E_NOTICE);
require_once "dbConnectDtls.php";
//require_once "dbConnectFCC.php";
//This control what is displayed in the dropdown of existing nets around line 612
// $str = $_GET["str"]; //echo("str= $str<br>");
// if ($str == '') {$andLine = "AND netcall = 'w0kcn' ";}
// else if ($str <> '' ){$andLine = "AND netCall = $str ";}
?>
<html lang="en">
<head>
<title>emComm Log DB</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href='https://fonts.googleapis.com/css?family=Allerta' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="css/NetManager.css" />
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
<!-- <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/jquery.table2excel.js"></script>
<script type="text/javascript" src="js/jquery.freezeheader.js"></script>
<!--<script type="text/javascript" src="http://www.csvscript.com/dev/html5csv.js"></script> -->
<script type="text/javascript" src="js/jQuery.fn.table2CSV.js"></script>
<script type="text/javascript" src="js/jquery.simpleTab.min.js"></script>
<!-- Needed for Tableexport.jquery.plugin -->
<script type="text/javascript" src="js/tableExport.js"></script>
<script type="text/javascript" src="js/jquery.base64.js"></script>
<script type="text/javascript" src="js/jspdf/libs/sprintf.js"></script>
<script type="text/javascript" src="js/jspdf/jspdf.js"></script>
<script type="text/javascript" src="js/jspdf/libs/base64.js"></script>
<!-- Include the plugin's CSS and JS: -->
<script type="text/javascript" src="js/bootstrap-multiselect.js"></script>
<link rel="stylesheet" href="css/bootstrap-multiselect.css" type="text/css"/>
<link rel="stylesheet" href="css/tabs.css" type="text/css"/>
<!-- applesiini.net/projects/jeditable -->
<script type="text/javascript" src="js/jeditable.js" charset="utf-8"></script>
<script type="text/javascript" src="js/sortTable.js"></script>
<!-- <script type="text/javascript" src="js/NetManagernew.js"></script> -->
<script type="text/javascript" src="js/hamgridsquare.js"></script>
<script type="text/javascript">
function buildReport() {
var d = new Date();
var month = d.getMonth()+1;
var day = d.getDate();
var dttm = d.getFullYear() + '/' +
(month<10 ? '0' : '') + month + '/' +
(day<10 ? '0' : '') + day;
var grp = $("#grp").val();
var rptType = $("input[name='rptType']:checked").val();
var rptFetr = $("input[name='rptFetr']:checked").val();
var rptHist = $("input[name='rptHist']").val();
var rptSort = $("input[name='rptSort']:checked").val();
$('#rptTitle').html(dttm+"<br>"+grp+" Activity Report for Past "+rptHist+" Months ");
// <span style=\"float:right;\">"+dttm+"</span>"
$.post("NCMreportsBuilder.php", {grp : grp , rptType : rptType , rptFetr : rptFetr , rptHist : rptHist , rptSort : rptSort })
.done(function( data ) {
$('#theRpt').html( data );
});
}
function findall() {
//$("#rptFeature").removeClass("hidden");
}
function hidothers() {
//$("#rptFeature").addClass("hidden");
}
</script>
<style>
body {
margin: 10px;
}
table {
width: 75%;
}
#rptTitle {
width: 25%;
}
table, th, td {
border: 1px solid black;
border-collapse: collapse;
}
th, td {
padding: 5px;
}
th {
text-align: center;
}
.h3size {
font-size: 18pt;
font-weight: bold;
color: #075400;
}
.smaller {
font-weight: bold;
color: #0030fc;
}
#rptTitle {
width: 90%;
font-size: 18pt;
color:#060ef4;
}
.myclass {
color:red;
font-weight:bold;
border-top:2px solid black;
border-bottom:2px solid black;
background-color:#dbf3f5;
font-size:12pt;
}
/* Sortable tables */
table.sortable thead {
background-color:#eee;
color:#666666;
font-weight: bold;
cursor: default;
}
</style>
</head>
<body>
<!-- https://stackoverflow.com/questions/10570904/use-jquery-to-change-a-second-select-list-based-on-the-first-select-list-option
https://stackoverflow.com/questions/10698192/populating-multiple-dependent-drop-downs-from-database
-->
<div id="pgtitle"> Net Control Find Manager</div>
<div id="rptTitle"></div>
<div id="theRpt"></div>
<h2>Select the find options below</h2>
<br>
<select id="try1" name="try1">
<option value="All" selected>Select one</option>
<?php
foreach($db_found->query("
select distinct netcall, county, state,
concat_ws(' ', netcall, county, state) as val1,
concat_ws(' ', netcall, county) as val2,
concat_ws(' ', county, state) as val3
from NetLog
where netcall != ''
and county != ''
order by val3
") as $row){
echo ("<option value='$row[val3]'>$row[val3]");
}
?>
</select>
<br>
<span class="group">Select the group
<select id="grp" name="grp">
<option value="All" selected>Select all</option>
<?php
foreach($db_found->query("
SELECT distinct netcall
FROM `NetLog`
WHERE netID <> '0'
AND netcall <> '0'
AND netcall <> ''
AND netcall <> 'TE0ST'
") as $act){
echo ("<option value='$act[netcall]'>$act[netcall]</option>");
}
?>
</select>
</span>
<!-- County -->
<span class="county"> Select the county
<select id="grp" name="grp">
<option value="All" selected>Select all</option>
<?php
foreach($db_found->query("
SELECT distinct county, state
FROM `NetLog`
where county <> ''
ORDER BY county
") as $act){
echo ("<option value='$act[county]'>$act[county], $act[state]</option>");
}
?>
</select>
</span>
<!-- Select the state -->
<span class="state"> Select the state
<select id="grp" name="grp">
<option value="All" selected>Select all</option>
<?php
foreach($db_found->query("
SELECT distinct state
FROM `NetLog`
ORDER BY state
") as $act){
echo ("<option value='$act[state]'>$act[state]</option>");
}
?>
</select>
</span>
</body>
</html>