13 $monLibrary = dirname(__FILE__) .
"/../library";
14 $sharedLibrary = dirname(__FILE__) .
"/../../shared/library";
15 $bankingLibrary = dirname(__FILE__) .
"/../../banking/library";
20 require_once(
"$monLibrary/ck_hticket.i");
21 require_once(
"$monLibrary/cu_top.i");
22 require_once(
"$sharedLibrary/cu_func.i" );
23 require_once(
"$monLibrary/monitorView.i");
25 if (!CheckPerm($link, $Hu,
'stmnt_reports', $_SERVER[
'REMOTE_ADDR'])) {
27 header(
"Location: /hcuadm/hcu_noperm.prg");
31 $errorTitle=
"Credit Union Reporting";
32 $title=
"Member Login Summary";
33 $Cu = strtoupper($_REQUEST[
"cu"]);
42 $sql =
"select substr(yearmo,1,4) || '-' || substr(yearmo,5,2) as month, 43 case when hcucode = 'CMB' then 'OldMBL' when hcucode = 'ADA' then 'Android' 44 when hcucode = 'APP' then 'iPhone' when hcucode = 'MBL' then 'MBLweb' 45 when hcucode = 'DSK' then 'Desktop' else 'Classic' end as product, 46 sum(logins) as logins, count(*) as members, 47 to_char(avg(logins),'999.9') as avgmem 48 from culogtrack where cu='$Cu' group by 1,2 order by 1 desc, 2";
50 $sth = db_query($sql, $dbh);
53 if (db_num_rows($sth) > 0) {
54 $drow=db_fetch_assoc($sth,0);
55 $fieldlist = array_keys($drow);
56 $return[
'keys']=$fieldlist;
57 for ($row=0;$drow=db_fetch_assoc($sth,$row);$row++) {
58 $return[
'data'][] = $drow;
61 $data_ary=json_encode($return[
'data']);
65 $dms_ok=array(
"action"=>
"string",
"key"=>
"string",
"screen" =>
"string",
66 "delimiter"=>
"string" );
67 dms_import_v2( $HB_ENV,
"MY_POST", $dms_ok);
69 $self = $_SERVER[
'SCRIPT_NAME'];
70 $baseURL = $_SERVER[
"SCRIPT_NAME"];
79 header(
'content-type: text/html; charset: utf-8');
80 printMonitorPageTop($title, $homecuKendoVersion, $cloudfrontDomainName);
85 font-family: Arial, Helvetica, sans-serif;
86 background-color: #EFEFEF;
91 padding: 0 10px 10px 10px;
92 -moz-box-shadow: 0 1px 2px rgba(0,0,0,0.5);
93 -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.5);
94 box-shadow: 0 1px 2px rgba(0,0,0,0.5);
95 border: 1px solid rgba(255,255,255,0.2);
96 -moz-border-radius: 3px;
97 -webkit-border-radius: 3px;
99 background: -moz-linear-gradient(top, rgba(0,0,0,0.01) 0%, rgba(0,0,0,0.07) 100%);
100 background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0,0,0,0.01)), color-stop(100%,rgba(0,0,0,0.07)));
101 background: -webkit-linear-gradient(top, rgba(0,0,0,0.01) 0%,rgba(0,0,0,0.07) 100%);
102 background: -o-linear-gradient(top, rgba(0,0,0,0.01) 0%,rgba(0,0,0,0.07) 100%);
103 background: -ms-linear-gradient(top, rgba(0,0,0,0.01) 0%,rgba(0,0,0,0.07) 100%);
104 background: linear-gradient(to bottom, rgba(0,0,0,0.01) 0%,rgba(0,0,0,0.07) 100%);
108 .configuration .options {
113 .configuration .options li {
120 .configuration .options li:after {
126 .configuration .configHead {
133 border-bottom: 1px solid #999;
135 .configuration .configHead label{
139 #detailConfiguration fieldset legend { 145 #detailConfiguration label { 151 #detailConfiguration fieldset.language div { 155 .configuration-language {
158 .configuration-language .lang-select {
160 vertical-align: middle;
161 border-right: 1px solid #AAA;
162 padding: 10px 10px 10px 0px;
165 .configuration-language .lang-title {
167 vertical-align: middle;
174 #editMenu .menuTree { 181 #editMenu .menuDetails { 184 .configuration-language ul {
187 .configuration-language li {
191 border-top:1px solid #DFDFDF;
196 font-family: Arial, Helvetica, sans-serif;
207 .sectionTitle strong {
213 padding: 20px 0 20px 20px;
214 background-color: #fcfcfc;
215 background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#efefef));
217 background: -webkit-linear-gradient(top, #ffffff, #efefef);
218 background: -moz-linear-gradient(top, #ffffff, #efefef);
219 background: -o-linear-gradient(top, #ffffff, #efefef);
220 background: -ms-linear-gradient(top, #ffffff, #efefef);
221 background: linear-gradient(top, #ffffff, #efefef);
222 -webkit-box-shadow: 0px 1px 2px #8e8e8e;
223 -moz-box-shadow: 0px 1px 2px #8e8e8e;
224 -o-box-shadow: 0px 1px 2px #8e8e8e;
225 box-shadow: 0px 1px 2px #8e8e8e;
237 #themeWrap .get-kendoui 241 -moz-border-radius:3px;
242 -webkit-border-radius:3px;
252 text-decoration: none;
253 display:
inline-block;
260 vertical-align: middle;
265 .k-theme-chooser .tc-link
267 vertical-align: middle;
269 padding: 0 4px 0 8px;
270 -moz-border-radius: 3px;
271 -webkit-border-radius: 3px;
277 vertical-align: middle;
285 list-style-type: none;
287 padding: 0 0 18px 10px;
288 border-bottom: 1px solid #dfdfdf;
289 font:75% Arial,Helvetica,sans-serif;
298 border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(255,255,255,.1);
299 display: inline-block;
313 border: 1px solid #fff;
316 .tc-theme .tc-link:hover
318 border-color: #d6d6d6;
319 -moz-box-shadow: 0 0 7px rgba(0,0,0,.15);
320 -webkit-box-shadow: 0 0 7px rgba(0,0,0,.15);
321 box-shadow: 0 0 7px rgba(0,0,0,.15);
324 .tc-theme .tc-link.active
326 border-color: #d6d6d6;
327 -moz-box-shadow: inset 0 0 7px rgba(0,0,0,.15);
328 -webkit-box-shadow: inset 0 0 7px rgba(0,0,0,.15);
329 box-shadow: inset 0 0 7px rgba(0,0,0,.15);
332 .tc-theme .tc-theme-name
339 #themeChooser .skin-black .k-state-selected{background-color:#0070e4;color:#fff;} 340 #themeChooser .skin-blueopal .k-state-selected{background-color:#005c83;color:#fff;} 341 #themeChooser .skin-bootstrap .k-state-selected{background-color:#0044cc;color:#fff;} 342 #themeChooser .skin-default .k-state-selected{background-color:#f0713a;color:#fff;} 343 #themeChooser .skin-highcontrast .k-state-selected{background-color:#a7008f;color:#fff;} 344 #themeChooser .skin-metro .k-state-selected{background-color:#8ebc00;color:#fff;} 345 #themeChooser .skin-metroblack .k-state-selected{background-color:#00aba9;color:#fff;} 346 #themeChooser .skin-silver .k-state-selected{background-color:#0879C0;color:#fff;} 347 #themeChooser .skin-uniform .k-state-selected{background-color:#ccc;color:#666;} 353 .k-tooltip-content { text-align: left;
359 <?php printMonitorPageMiddle($title, $additionalMenuOptions= array(
"Refresh" => array(
"id" =>
"grid_toolbar_freshBtn"))); ?>
361 <div
id=
"inqList"></div>
362 <div
id=
"showInfo"></div>
364 <div
id=
"progressShow" style=
"z-index:20000;"></div>
365 <script
id=
"popup-editor" type=
"text/x-kendo-template">
366 <h3 style=
'text-align:center; width:100%;'><?php echo $title; ?></h3>
369 for ( $i = 0; $i < count( $return[
'keys'] ); $i++ ) {
370 $keyval = $return[
'keys'][$i];
373 <label
for=
"<?php echo $keyval ?>" style=
'font-weight:bold;'><?php echo $keyval ?>:</label>
374 <input type=
"text" name=
"<?php echo $keyval ?>" 375 id=
"<?php echo $keyval ?>" 376 data-bind=
"value:<?php echo $keyval ?>" 377 data-value-field=
"<?php echo $keyval ?>" 378 data-text-field=
"<?php echo $keyval ?>" 380 <div style=
"clear:both"></div>
387 .k-edit-form-container { width:
auto; }
388 .edit_label { text-align: left; font-weight: bold; font-size: larger; }
389 .edit_entry { text-align: left; }
390 .odd-row { background-color:lightcyan; }
391 .header-row { background-color: lightsteelblue; font-weight: bold; }
392 .td-detail { text-align: center; width: 33%; }
393 .td-info { text-align: left; font-family: monospace; white-space: pre; }
395 <script type=
"text/javascript">
396 $(document).ready(
function() {
397 $(
"#tabstrip").kendoTabStrip({
398 animation: { open: { effects:
"fadeIn"} }
404 operators : { string : { contains :
"Contains"}},
405 ui :
function( element )
407 var parent = element.parent();
408 while( parent.children().length > 1 )
409 $(parent.children()[0]).
remove( );
411 parent.prepend(
"<input data-bind=\"value:filters[0].value\" class=\"k-textbox\" type=\"text\">" );
415 var dataList = <?php echo $data_ary; ?> ;
416 $(
'#inqList').kendoGrid({
422 month : {type:
"string"},
423 product: {type:
"string"},
424 logins : {type:
"number"},
425 members : {type:
"number"},
426 avgmem : {type:
"number"}
433 pageSizes: [10, 20, 50],
442 filterable: { contains:
true },
444 { field:
"month", title:
"Month", type:
"string", filterable:
true, width:
"30px" , encoded:
false },
445 { field:
"product", title:
"Product", type:
"string", filterable:
true, width:
"60px", encoded:
false },
446 { field:
"logins", title:
"Logins", type:
"number", filterable:
false,
447 attributes:{style:
"text-align:right; padding-right:25px"}, width:
"30px", encoded:
false },
448 { field:
"members", title:
"Members", type:
"number", filterable:
false,
449 attributes:{style:
"text-align:right; padding-right:25px"}, width:
"30px", encoded:
false },
450 { field:
"avgmem", title:
"Average / Active Member", type:
"number", filterable:
false, format:
"{0:n2}",
451 attributes:{style:
"text-align:right; padding-right:25px"}, width:
"40px", encoded:
false }
455 $(
"#grid_toolbar_freshBtn").click(
function(e) {
456 window.location.reload();
458 $(
"#grid_toolbar_exitBtn").click(
function(e) {
459 window.location.assign(
'<?php echo $produrl; ?>/monitor/mindex.html');
466 }
catch (Exception $e) {
472 printMonitorPageTop($errorTitle, $homecuKendoVersion, $cloudfrontDomainName);
473 printMonitorPageMiddle($errorTitle);
475 print
"<h3>{$e->getMessage()}</h3>";
476 printMonitorPageBottom();