Odyssey
lnapp.prg
1 <?php
2  /*
3  * Script: lnapp.view
4  *
5  * Purpose: This script will show the information for a Credit Union regarding the loans. This includes their hash key that is used to access the loan system.
6  * Also, will show the current list of loans, with the ability for new loan, edit loan, copy loan.
7  * SPB: 10/6/2015 version 2 with kendo
8  */
9 
10  // * Determine what the hash would be -- This MasterKey needs to match what is in LoanApp.prg
11  $masterKey = 'ndcng/Mwln#TR-3APMkxf68MaFWeaXaD';
12 
13  $monLibrary = dirname(__FILE__) . "/../library";
14  $sharedLibrary = dirname(__FILE__) . "/../../shared/library";
15  $eformsLibrary = dirname(__FILE__) . "/../../eforms/library";
16  require_once("$monLibrary/cu_top.i");
17  require_once("$monLibrary/monitorView.i");
18  require_once("$monLibrary/ck_hticket.i");
19  require_once("$sharedLibrary/commonJsFunctions.i");
20 
21  require_once("$eformsLibrary/lnappfunctions.i"); // TODO: that reference isn't going to work (probably).
22 
23  if (!CheckPerm($link, $Hu, 'loanAppConfig', $_SERVER['REMOTE_ADDR'])) {
24  // ** Permissions failed
25  // ** redirect to new page
26  header("Location: /hcuadm/hcu_noperm.prg");
27  exit;
28  }
29 
30  // Globals
31  $dataFile= "lnapp.data";
32  $showSQL= false;
33 
34  dms_import_v2($DATA_PARAMETERS, "TOP_LEVEL", array("user_name" => "string"));
35  $uncasedCu= $DATA_PARAMETERS["TOP_LEVEL"]["user_name"];
36  $cu= strtoupper($uncasedCu);
37 
38  $httpScriptPath = '';
39 
40  $hashCu = encrypt($cu, $masterKey);
41 
42  $strPos = strpos($_SERVER['SERVER_NAME'], ".");
43  $homeHost = substr($_SERVER['SERVER_NAME'], 0, $strPos);
44 
45  $sampleURL = "$produrl/eforms/LoanApp.prg?id=" . urlencode($hashCu) . "&appinit=1";
46  $sampleSSOURL = "$produrl/eforms/LoanApp.prg?id=" . urlencode($hashCu) . "&appinit=1&f=hbssouser";
47 
48  // Determine if the loan portal fragment is created, this will change the link.
49  $portalFileName = 'lnappCuPortal.html'; // ** Loan App Portal
50  $fragMntcLink = "$produrl/hcuadm/Fragmntc.prg?user_name=" . $uncasedCu;
51 
52  // Prepare each row for the information
53  // Determine if the file exists in the users directory
54  $fragExists = is_readable(escapeshellcmd("/home/$uncasedCu/public_html/{$portalFileName}"));
55  if ($fragExists)
56  {
57  // File EXISTS -- so setup the fields
58  $fileLink = "<a class=\"link\" href=\"{$fragMntcLink}&act=Edit&f={$portalFileName}\">Edit Fragment</a> |
59  <a class=\"link\" href=\"{$fragMntcLink}&act=Delete&f={$portalFileName}\">Delete Fragment</a> ";
60  }
61  else
62  {
63  $fileLink = "<a class=\"link\" href=\"{$fragMntcLink}&act=Create&f={$portalFileName}\">Edit Fragment</a>";
64  }
65  $title= "$cu Loan Maintenance";
66  printMonitorPageTop($title, $homecuKendoVersion, $cloudfrontDomainName);
67 ?>
68 
69 <style>
70  #accordion {
71  border-color: rgb(204, 204, 204);
72  background-color: rgb(238, 238, 238);
73  border-radius: 6px;
74  color: rgb(51, 131, 187) !important;
75  display: block;
76  font-family: 'Trebuchet MS', 'Lucida Grande', Verdana, Arial, sans-serif;
77  font-size: 11px;
78  font-weight: bold;
79  }
80 
81  .popupForm .grid_12, .formContainer .grid_12 {
82  margin-bottom: 5px;
83  }
84 
85  .k-context-menu .k-item, .k-context-menu {
86  width: 150px !important;
87  }
88 
89  .k-grid td {
90  padding-top: 0px !important;
91  padding-bottom: 0px !important;
92  }
93 
94  .listExpand li {
95  list-style-position: inside;
96  }
97 
98  ul li p {
99  margin-left: 2em;
100  text-indent: -1em;
101  }
102 </style>
103 <script type="text/javascript">
104 
105 <?php
106 // Include common functions
107 getErrorsAreShownFunction();
108 getAddMinifiedActionStyleFunction();
109 getEscapeHTMLFunction();
110 getShowSQLFunction($showSQL);
111 getSetupValidatorInGridFunction();
112 getUseValidatorInGridFunction();
113 getShowWaitFunctions();
114 getContextMenuForSingleLevelGrid();
115 ?>
116 
117 function initAccordion()
118 {
119  var accordion= $("#accordion").kendoPanelBar({}).data("kendoPanelBar");
120  $(".listExpand:eq(0)").html($("#list1Template").html());
121  $(".listExpand:eq(1)").html($("#list2Template").html());
122 }
123 
124 function initOptionsGrid()
125 {
126  var initialized= false, configDDL= [], configLists= [];
127 
128  var configOptionsGrid= $("#configOptionsGrid").kendoGrid({
129  dataSource: {
130  transport: {
131  read: {
132  url: "/hcuadm/<?php echo $dataFile; ?>?operation=readOptions",
133  dataType: "json",
134  type: "POST"
135  },
136  create: {
137  url: "/hcuadm/<?php echo $dataFile; ?>?operation=createOption",
138  dataType: "json",
139  type: "POST"
140  },
141  update: {
142  url: "/hcuadm/<?php echo $dataFile; ?>?operation=updateOption",
143  dataType: "json",
144  type: "POST"
145  },
146  parameterMap: function (data, type) {
147  showWaitWindow();
148  parameters= {cu: "<?php echo $cu; ?>"};
149  if (type != "read")
150  {
151  parameters.value= data.value;
152  parameters.configId= data.configId;
153  }
154  console.log(parameters);
155 
156  return parameters;
157  }
158  },
159  schema: {
160  model: {
161  id: "configId",
162  fields: {
163  configId: {type: "string"},
164  configText: {type: "string"},
165  type: {type: "string"},
166  value: {type: "string"},
167  disabled: {type: "boolean"}
168  }
169  },
170  parse: function (data) {
171  hideWaitWindow();
172  showSQL(data);
173 
174  if (data.operation == "read")
175  {
176  $("#invalidRequestServerSide").val(errorsAreShown(data, "formValidateMainDiv"));
177  configDDL= data.configDDL;
178  configLists= data.configLists;
179  }
180  else
181  {
182  $("#invalidRequestServerSide").val(errorsAreShown(data, "formValidatePopupDiv"));
183  }
184  return data.record;
185  }
186  }
187  },
188  columns: [
189  {field: "configText", title: "Option"},
190  {field: "value", title: "Value"}
191  ],
192  toolbar: [{name: "create", text: ""}],
193  editable: {
194  mode: "popup",
195  template: kendo.template($("#configOptionsPopupTemplate").html()),
196  window: {
197  draggable: false,
198  resizable: false,
199  title: "",
200  actions: [],
201  width: 400
202  }
203  },
204  edit: function (e)
205  {
206  setupValidatorInGrid(e);
207 
208  $("#valueTextDiv textarea").blur(function () {
209  e.model.value= $(this).val();
210  e.model.dirty= true;
211  });
212 
213  $("#valueUrlDiv input").blur(function () {
214  e.model.value= $(this).val();
215  e.model.dirty= true;
216  });
217 
218  $("#valueBooleanDiv input").click(function () {
219  e.model.value= $(this).prop("checked") ? "1" : "0";
220  e.model.dirty= true;
221  });
222 
223  var valueDDL= $("#valueListDiv div").kendoDropDownList({
224  dataSource: {
225  data: []
226  },
227  autoBind: false,
228  filter: "startswith",
229  change: function() {
230  e.model.dirty= true;
231  e.model.value= this.value();
232  },
233  dataBound: function() {
234  this.value(e.model.value);
235  }
236  }).data("kendoDropDownList");
237 
238  if (e.model.isNew())
239  {
240  $(".k-window-title:visible").text("Add Option");
241  $("#optionLabel").remove();
242  $("#optionDDL").show();
243 
244  var lookup= {};
245  var data= this.dataSource.data();
246  var limitedConfigDDL= [];
247  for(var i=0; i!= data.length; i++)
248  {
249  lookup[data[i].configId]= true;
250  }
251  for (var i=0; i!= configDDL.length; i++)
252  {
253  if (typeof(lookup[configDDL[i].value]) == "undefined")
254  limitedConfigDDL.push(configDDL[i]);
255  }
256  var optionChange= function () {
257  var dataItem= this.dataItem();
258  if (dataItem != null)
259  {
260  e.model.type= dataItem.type;
261  e.model.configId= dataItem.value;
262  e.model.configText= dataItem.text;
263 
264  switch(dataItem.type)
265  {
266  case "boolean":
267  $("#valueBooleanDiv").show();
268  $(".valueDiv:not(#valueBooleanDiv)").hide();
269 
270  if (typeof(dataItem.disabled) != "undefined" && dataItem.disabled)
271  $("#valueBooleanDiv input").prop("disabled", true);
272  else
273  {
274  $("#valueBooleanDiv input").prop("disabled", false);
275  if (typeof(dataItem.defaultValue) != "undefined" && dataItem.defaultValue == "true")
276  {
277  $("#valueBooleanDiv input").prop("checked", true);
278  e.model.value= "1";
279  }
280  else
281  {
282  $("#valueBooleanDiv input").prop("checked", false);
283  e.model.value= "0";
284  }
285 
286  }
287  break;
288  case "list":
289  $("#valueListDiv").show();
290  $(".valueDiv:not(#valueListDiv)").hide();
291 
292  valueDDL.dataSource.data(typeof(configLists[dataItem.value]) == "undefined" ? [] : configLists[dataItem.value]);
293 
294  if (typeof(dataItem.disabled) != "undefined" && dataItem.disabled)
295  valueDDL.enable(false);
296  else
297  {
298  valueDDL.enable(true);
299  if (typeof(dataItem.defaultValue) != "undefined")
300  valueDDL.value(dataItem.defaultValue);
301  }
302  break;
303  case "url":
304  $("#valueUrlDiv").show();
305  $(".valueDiv:not(#valueUrlDiv)").hide();
306 
307  if (typeof(dataItem.disabled) != "undefined" && dataItem.disabled)
308  $("#valueUrlDiv input").prop("disabled", true);
309  else
310  {
311  $("#valueUrlDiv input").prop("disabled", false);
312  if (typeof(dataItem.defaultValue) != "undefined")
313  $("#valueUrlDiv input").val(dataItem.defaultValue);
314  }
315  break;
316  case "string":
317  default:
318  $("#valueTextDiv").show();
319  $(".valueDiv:not(#valueTextDiv)").hide();
320 
321  if (typeof(dataItem.disabled) != "undefined" && dataItem.disabled)
322  $("#valueTextDiv textarea").prop("readonly", true);
323  else
324  {
325  $("#valueTextDiv textarea").prop("readonly", false);
326  if (typeof(dataItem.defaultValue) != "undefined")
327  $("#valueUrlDiv input").val(dataItem.defaultValue);
328  }
329  }
330  }
331  };
332 
333  var optionDDL= $("#optionDDL").kendoDropDownList({
334  dataSource: {
335  data: limitedConfigDDL,
336  schema: {
337  model: {
338  id: "value",
339  fields: {
340  value: {type: "string"},
341  text: {type: "string"},
342  type: {type: "string"},
343  defaultValue: {type: "string"},
344  disabled: {type: "boolean"}
345  }
346  }
347  }
348  },
349  filter: "startswith",
350  dataTextField: "text",
351  dataValueField: "value",
352  change: optionChange,
353  dataBound: optionChange
354  }).data("kendoDropDownList");
355  }
356  else
357  {
358  $(".k-window-title:visible").text("Edit Option");
359  $("#optionLabel").show();
360  $("#optionDDL").remove();
361 
362  switch(e.model.type)
363  {
364  case "boolean":
365  $("#valueBooleanDiv").show();
366  $(".valueDiv:not(#valueBooleanDiv)").remove();
367 
368  if (e.model.value == "1")
369  $("#valueBooleanDiv input").prop("checked", true);
370  if (e.model.disabled)
371  $("#valueBooleanDiv input").prop("disabled", true);
372  break;
373  case "list":
374  $("#valueListDiv").show();
375  $(".valueDiv:not(#valueListDiv)").remove();
376 
377  valueDDL.dataSource.data(typeof(configLists[e.model.configId]) == "undefined" ? [] : configLists[e.model.configId]);
378  valueDDL.text(e.model.value);
379 
380  if (e.model.disabled)
381  valueDDL.enable(false);
382  break;
383  case "url":
384  $("#valueUrlDiv").show();
385  $(".valueDiv:not(#valueUrlDiv)").remove();
386 
387  $("#valueUrlDiv input").val(e.model.value);
388 
389  if (e.model.disabled)
390  $("#valueUrlDiv input").prop("disabled", true);
391  break;
392  case "string":
393  default:
394  $("#valueTextDiv").show();
395  $(".valueDiv:not(#valueTextDiv)").remove();
396 
397  $("#valueTextDiv textarea").val(e.model.value);
398 
399  if (e.model.disabled)
400  $("#valueTextDiv textarea").prop("readonly", true);
401  break;
402  }
403  }
404 
405  if (e.model.type == "boolean" && (typeof(e.model.value) == "undefined" || e.model.value.trim() == ""))
406  e.model.value= "0";
407  },
408  save: function (e)
409  {
410  useValidatorInGrid(e);
411  },
412  dataBound: function (e) {
413  fullContextMenu.gridDatabound(initialized);
414  if (!initialized)
415  {
416  addMinifiedActionStyle(this, true);
417  initialized= true;
418  }
419  },
420  cancel: function (e) {
421  this.cancelRow();
422  fullContextMenu.gridCancel();
423  e.preventDefault();
424  return false;
425  }
426  }).data("kendoGrid");
427 
428  var fullContextMenu= new getFullContextMenuSingle("configOptionsGrid", "configOptionsContextMenu", "configOptionsDeleteDialog", "configId",
429  "/hcuadm/<?php echo $dataFile; ?>?operation=deleteOption&cu=<?php echo $cu; ?>");
430 }
431 
432 function initLoanApplicationsGrid()
433 {
434  var initialized= false, templateDDLData= [];
435  var loanAppGrid= $("#loanAppGrid").kendoGrid({
436  dataSource: {
437  transport: {
438  read: {
439  url: "/hcuadm/<?php echo $dataFile; ?>?operation=readLoanApplications",
440  dataType: "json",
441  type: "POST"
442  },
443  create: {
444  url: "/hcuadm/<?php echo $dataFile; ?>?operation=createLoanApplication",
445  dataType: "json",
446  type: "POST"
447  },
448  update: {
449  url: "/hcuadm/<?php echo $dataFile; ?>?operation=updateLoanApplication",
450  dataType: "json",
451  type: "POST"
452  },
453  parameterMap: function (data, type) {
454  showWaitWindow();
455  var parameters= null;
456  if (type == "read")
457  parameters= {cu: "<?php echo $cu; ?>"};
458  else
459  {
460  parameters= {title: data.title, fragment: data.fragment};
461  if (type == "create")
462  {
463  parameters.cu= "<?php echo $cu; ?>";
464  parameters.templateId= data.templateId;
465  }
466  else
467  {
468  parameters.loanId= data.loanId;
469  }
470  }
471  return parameters;
472  }
473  },
474  schema: {
475  model: {
476  id: "loanId",
477  fields: {
478  loanId: {type: "string"},
479  title: {type: "string"},
480  fragment: {type: "string"},
481  lastModified: {type: "date"}
482  }
483  },
484  parse: function (data) {
485  hideWaitWindow();
486  showSQL(data);
487 
488  if (data.operation == "read")
489  {
490  $("#invalidRequestServerSide").val(errorsAreShown(data, "formValidateMainDiv"));
491  templateDDLData= data.templateDDL;
492  }
493  else
494  {
495  $("#invalidRequestServerSide").val(errorsAreShown(data, "formValidatePopupDiv"));
496  data.record[0].lastModified= new Date();
497 
498  // Need to add to template.
499  templateDDLData.splice(templateDDLData.length-1, 0, {text: data.record[0].title, value: data.record[0].loanId}); // Add it before the blank
500  }
501  return data.record;
502  }
503  }
504  },
505  columns: [
506  {field: "loanId", title: "#", width: "85px"},
507  {field: "title", title: "Title"},
508  {field: "lastModified", title: "Updated", format: "{0:MM/dd/yy}", width: "75px"},
509  {field: "fragment", title: "Fragment"}
510  ],
511  toolbar: [{name: "create", text: ""}],
512  editable: {
513  mode: "popup",
514  template: kendo.template($("#loanApplicationPopupTemplate").html()),
515  window: {
516  draggable: false,
517  resizable: false,
518  title: "",
519  actions: [],
520  width: 400,
521  autoFocus: false
522  }
523  },
524  edit: function (e)
525  {
526  setupValidatorInGrid(e);
527 
528  if (e.model.isNew())
529  {
530  $(".k-window-title:visible").text("Add Loan Application");
531  $("#templateDDLRow").show();
532  var templateDDL= $("#templateDDL").kendoDropDownList({
533  dataSource: {
534  data: templateDDLData,
535  schema: {
536  model: {
537  id: "value",
538  fields: {
539  value: {type: "number"},
540  text: {type: "string"}
541  }
542  }
543  }
544  },
545  dataTextField: "text",
546  dataValueField: "value",
547  filter: "startswith",
548  change: function() {
549  e.model.templateId= this.value();
550  },
551  dataBound: function() {
552  e.model.templateId= this.value();
553  }
554  }).data("kendoDropDownList");
555 
556  }
557  else
558  {
559  $(".k-window-title:visible").text("Edit Loan Application");
560  $("#templateDDLRow").remove();
561  }
562  },
563  save: function (e)
564  {
565  useValidatorInGrid(e);
566  },
567  dataBound: function (e)
568  {
569  fullContextMenu.gridDatabound(initialized);
570  if (!initialized)
571  {
572  addMinifiedActionStyle(this, true);
573  initialized= true;
574  }
575  },
576  cancel: function (e)
577  {
578  this.cancelRow();
579  fullContextMenu.gridCancel();
580  e.preventDefault();
581  return false;
582  }
583  }).data("kendoGrid");
584 
585  var fullContextMenu= new getFullContextMenuSingle("loanAppGrid", "loanAppContextMenu", "loanAppDeleteDialog", "loanId",
586  "/hcuadm/<?php echo $dataFile; ?>?operation=deleteLoanApplication&cu=<?php echo urlencode($cu); ?>");
587 
588  fullContextMenu.addFunctions(function(options, dataItem) {
589  options.push({text: "Export", cssClass: "exportLi"}, {text: "Edit Loan App Layout", cssClass: "detailsLi"});
590  },
591  function(item, dataItem) {
592  if ($(item).hasClass("exportLi"))
593  {
594  window.open("/hcuadm/lnappExport.prg?cu=<?php echo urlencode($cu); ?>&loanid=" + dataItem.loanId + "&action=export");
595  }
596  else if ($(item).hasClass("detailsLi"))
597  {
598  window.open("/hcuadm/lnappEdit.prg?user_name=<?php echo urldecode($cu); ?>&loanid=" + dataItem.loanId);
599  }
600  });
601 }
602 
603 $(document).ready(function () {
604  initAccordion();
605  initOptionsGrid();
606  initLoanApplicationsGrid();
607 });
608 </script>
609 
610 <script id="configOptionsPopupTemplate" type="text/x-kendo-template">
611  <div id="formValidatePopupDiv" class="homecu-formStatus k-block k-error-colored" style="display:none;"></div>
612  <form id="popupForm" class="popupForm" data-role="validator" novalidate>
613  <div class="container_12">
614  <div class="grid_12">
615  <div class="grid_4 alpha">
616  <label>Option:</label>
617  </div>
618  <div class="grid_7">
619  <div id="optionLabel" style="display:none;">#: configId #</div>
620  <div id="optionDDL" style="display:none;width:100%"></div>
621  </div>
622  <div class="grid_1 omega">
623  &nbsp;
624  </div>
625  </div>
626  <div class="grid_12">
627  <div class="grid_4 alpha">
628  <label>Value:</label>
629  </div>
630  <div class="grid_7">
631  <div id="valueTextDiv" class="valueDiv" style="display: none;">
632  <textarea class="k-input" style="width: 100%; height: 100px" row=15 col=40></textarea>
633  </div>
634  <div id="valueBooleanDiv" class="valueDiv" style="display: none;">
635  <input type="checkbox">
636  </div>
637  <div id="valueListDiv" class="valueDiv" style="display: none;">
638  <div id="valueDDL" style="width: 100%"></div>
639  </div>
640  <div id="valueUrlDiv" class="valueDiv" style="display: none;">
641  <input class="k-input" type="text" homecu-match='url' data-homecuCustomMatch-msg='Value needs to be a valid url.' style="width: 100%">
642  </div>
643  </div>
644  <div class="grid_1 omega">
645  <span data-for='valueUrl' class='k-invalid-msg'></span>
646  </div>
647  </div>
648  </div>
649  </form>
650 </script>
651 <script id="loanApplicationPopupTemplate" type="text/x-kendo-template">
652  <div id="formValidatePopupDiv" class="homecu-formStatus k-block k-error-colored" style="display:none;"></div>
653  <form id="popupForm" class="popupForm" data-role="validator" novalidate>
654  <div class="container_12">
655  <div class="grid_12">
656  <div class="grid_4 alpha">
657  <label>Loan Title:</label>
658  </div>
659  <div class="grid_7">
660  <input type="text" class="k-input" name="title" required data-required-msg="Loan Title is required" style="width:100%" autofocus>
661  </div>
662  <div class="grid_1 omega">
663  <span data-for='title' class='k-invalid-msg'></span>
664  </div>
665  </div>
666  <div class="grid_12">
667  <div class="grid_4 alpha">
668  <label>Fragment:</label>
669  </div>
670  <div class="grid_7">
671  <input type="text" class="k-input" name="fragment" style="width:100%">
672  </div>
673  <div class="grid_1 omega">
674  <span data-for='fragment' class='k-invalid-msg'></span>
675  </div>
676  </div>
677  <div class="grid_12" id="templateDDLRow" style="display:none;">
678  <div class="grid_4 alpha">
679  <label>Copy From:</label>
680  </div>
681  <div class="grid_7">
682  <div id="templateDDL" style="width:100%"></div>
683  </div>
684  <div class="grid_1 omega">
685  &nbsp;
686  </div>
687  </div>
688  </div>
689  </form>
690 </script>
691 <script id="list1Template" type="text/x-kendo-template">
692  <ul>
693  <li><p>Allow Home Banking Login
694  <br>&nbsp;&nbsp;This option expects either a 1 or 0.
695  <br>&nbsp;&nbsp;1 - The login screen for the loan application system will allow
696  the member to login with their Home Banking credentials.
697  <br>&nbsp;&nbsp;0(default) - The login screen will only allow the member to login using
698  a separate account identified by email.
699  </p></li>
700  <li><p>Disable Email Login
701  <br>&nbsp;&nbsp;This option expects either a 1 or 0.
702  <br>&nbsp;&nbsp;1 - The login screen for the loan application system will NOT allow the member to authenticate using an email. They MUST use their Home Banking credentials
703  <br>&nbsp;&nbsp;0(default) - The login screen will allow the member to login using a separate account identified by email.
704  </p></li>
705  <li><p>SSO Only
706  <br>&nbsp;&nbsp;This option expects either a 1 or 0.
707  <br>&nbsp;&nbsp;1 - If set the ONLY way a user can access the loan app system is via a link from their Home Banking while they are authenticated.
708  <br>&nbsp;&nbsp;0(default) - The login screen will be accessible for
709  </p></li>
710  <li>
711  <p>Post Loan Applications to Core
712  <br>&nbsp;&nbsp;This option expects either a 1 or 0. (only for 'live' credit unions)
713  <br>&nbsp;&nbsp;1 (default for live) - The loan will be submitted to the credit union core for processing.
714  <br>&nbsp;&nbsp;0 - The loan will not be submitted and must be processed by the credit union
715  using HomeCU admin.
716  </p></li>
717  <li>
718  <p>Post Loan Applications with Member
719  <br>&nbsp;&nbsp;This option expects either a 1 or 0. (only for 'live' credit unions)
720  <br>&nbsp;&nbsp;0 (default) - The loan will NOT be submitted with the member number (ie CU-CENTRIC)
721  <br>&nbsp;&nbsp;1 - The loan will be submitted with the Member Number (ie CRUISE)
722  </p></li>
723  <li>
724  <p>Post Loan Applications Format
725  <br>&nbsp;&nbsp;This option expects one of following {XML, JSON, SERIAL}
726  <br>&nbsp;&nbsp;XML - Export the data to the core in XML Format
727  <br>&nbsp;&nbsp;JSON - Export the data to the core in JSON Format
728  <br>&nbsp;&nbsp;SERIAL - Export the data to the core in PHP Serialized Format
729  </p></li>
730  <li>
731  <p>Allow Member Info to Populate From Core
732  <br>&nbsp;&nbsp;This option expects either a 1 or 0. (only for 'live' credit unions)
733  <br>&nbsp;&nbsp;1 - When starting a new loan, the MIR packet will retrieved from the core and certain fields
734  will pre-populate into the loan application.
735  <br>&nbsp;&nbsp;0(default) - No information is pre-populated.
736  </p></li>
737  <li>
738  <p>Loan App Stylesheet
739  <br>&nbsp;&nbsp;This option allows you to enter the style sheet to use for the Loan App System.
740  <br>&nbsp;&nbsp;The string is expected to be a qualified URL ie https://www4.homecu.net/fi/cucode/css/style.css
741  <br>&nbsp;&nbsp;If this option is not configured the Loan App system will use the style sheet located at
742  <br>&nbsp;&nbsp;/lnapp_incude/css/style.css
743  </p></li>
744  <li>
745  <p>Loan Login Message for Members
746  <br>&nbsp;&nbsp;This option will let you customize the login message for
747  Members of the credit union when they login with their Home Banking credentials.
748  (Make sure to address the situation where User Names are allowed or required.)
749  <br>&nbsp;&nbsp;There is a default if this option is left blank
750  </p></li>
751  <li>
752  <p>Loan Login Message for Members not in Home Banking
753  <br>&nbsp;&nbsp;This option will let you customize the login message for
754  Members of the credit union that are not Home Banking users. It will only show up
755  when the credit union core supports MIR packets (i.e. Allow Member Info to Populate From Core is set).
756  <br>&nbsp;&nbsp;There is a default if this option is left blank
757  </p></li>
758  <li><p>
759  Loan Login Message for non-Members
760  <br>&nbsp;&nbsp;This option will let you customize the login message for
761  non-Members, or users that will login without using their Home Banking
762  credentials.
763  <br>&nbsp;&nbsp;There is a default if this option is left blank
764 
765  </p></li>
766  <li><p>
767  Password Configuration
768  <br>&nbsp;&nbsp;Configure the password requirements for when a user changes their password.
769  This uses JSON format where len = minimum length, upper = number of upper case, lower =
770  number of lower case, spec = number of special characters, and digit = number of digits.
771  <br>&nbsp;&nbsp;There is a default if this option is left blank:
772  <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{"len":"8","upper":"1","lower":"1","spec":"0","digit":"1"}
773 
774  </p></li>
775  <li><p>
776  Only Submit Fields With Data
777  <br>&nbsp;&nbsp;This option expects either a 1 or 0. (only for 'live' credit unions)
778  <br>&nbsp;&nbsp;1 - Empty fields will not be included in the application sent to the core.
779  <br>&nbsp;&nbsp;&nbsp;&nbsp;**NOTE: This option can be overruled when defining the field and checking "Always Send".
780  <br>&nbsp;&nbsp;0 (Default) - All defined fields in the application are sent to the core.
781  </p></li>
782  </ul>
783 </script>
784 <script id="list2Template" type="text/x-kendo-template">
785  <ul>
786  <li><p>
787  <em>Start A Loan Form</em> - You can start a new form by choosing the '+ Add new record' link
788  in the Loan Applications table.
789  <ul>
790  <li><p>
791  <em>Loan Title</em> - This is a title used for the Loan Application. It can be displayed in the loan, so it
792  should describe the loan without being too vague.
793  </p></li>
794  <li><p>
795  <em>Last Modified</em> - This is the last modified date.
796  <br>&nbsp;&nbsp;**Note: this field may not appear to update after saving an application. The screen needs to refresh to show new data.
797  </p></li>
798  <li><p>
799  <em>Fragment</em> - This field can be blank. This string should be the
800  name of a fragment file in the public_html directory for the CU. Because this can be any filename and there can be any
801  number of them, there is not fragment maintenance available for it.
802  <br>&nbsp;&nbsp;If this string is the name of a valid file. The member will be prompted with the contents of this file and must
803  click an Approve button before they are sent to the Application screen.
804  </p></li>
805  </ul>
806  </p></li>
807  <li><p>
808  <em>Edit A Loan</em> - You can edit any loan by double-clicking the row in which you want to edit.
809  <br>&nbsp;&nbsp;**Note: the screen popping up may take a second to load as it processes the application.
810  </p></li>
811  <li><p>
812  <em>Delete A Loan</em> - You can delete any loan by clicking the trash bin in each row.
813  </p></li>
814  </ul>
815 </script>
816 
817 <?php printDeleteTemplate(); ?>
818 <?php printMonitorPageMiddle($title, null, true); ?>
819 
820  <div class="container_12">
821  <div class="grid_12">
822  <ul id="accordion">
823  <li>Configuration
824  <ul><li><p>
825  Different configuration options are available for the credit union.
826  These options are applied to the Loan Application System for ONLY
827  this credit union.
828  <br/>
829  The following options are configurable from the Loan App Configuration Options table below:<br/>
830  <span class="listExpand"></span>
831  <br/>
832  Apart from these options, the 'Portal' screen for the Loan App system is a fragment
833  named lnappCuPortal.html (On-Line Loan App Portal Menu)
834  that is editable from the Credit Union's Fragment Maintenance Screen.
835  <br/>
836  This fragment will include the code necessary to navigate to the loans setup below.
837  <br/>
838  Email Notifications - The loan system is also configured to email a notice
839  when a loan is submitted. The email will be sent to the email(s)
840  in the 'Loan System Notifications' recipients in 'CU E-mail Notifications'
841  </p></li></ul></li>
842  <li>Portal Fragment
843  <ul><li><p>
844  After authenticating the user is taken to a portal screen. This screen contains a premade menu,
845  a table to view current loan statuses and available loan section.
846  <br/>The loan section is customizable using a 'Fragment'. The fragment is named <span style='font-style:italic'>lnappCuPortal.html</span>
847  located in the root folder of the clients HomeCU Dir ie <span style='font-style:italic'>/home/cucode/public_html</span>.
848  <br/>It can be maintained using the following link:
849  <br/>
850  <?php echo $fileLink; ?>
851  </p></li></ul></li>
852  <li>Loan Maintenance
853  <ul><li><p>
854  The Loan Applications table below will list all the loans that are setup for this credit union.
855  They may or may not be accessible, which is determined by the lnappCuPortal fragment.
856  <br/>
857  <span class="listExpand"></span>
858  </p></li></ul></li>
859  <li>System Access
860  <ul><li><p>
861  When creating the link to be passed to the loan system, an 'id' will
862  be used. Also set the param appinit=1 on the url when creating the app link.
863  <br>Here is the id for this credit union.
864  <br/><strong><?php echo $hashCu; ?></strong>
865  <br/><br/>
866  Here is the link to this credit union's Online Loan Application System.
867  <br/><strong><?php echo $sampleURL; ?></strong>
868  <br/><br/>
869  Here is the link already in an anchor tag<br/>
870  <a href='<?php echo $sampleURL; ?>' target='_blank'>Apply for a loan</a>
871  <br/><br/>
872  Here is the link for use with Home Banking, so the member can directly log in to the system, like SSO.
873  <br/><?php echo $sampleSSOURL; ?>
874  <br/>
875  <a href='<?php echo $sampleSSOURL; ?>' target='_blank'>Apply for a loan</a>
876  </p></li></ul></li>
877  </ul>
878  </div>
879  <div class="grid_12">&nbsp;</div>
880  <div class="grid_12">
881  <div id="sqlOutput"></div>
882  </div>
883  <div class="grid_12">
884  <div id="formValidateMainDiv" class="k-block k-error-colored" style="display:none;"></div>
885  </div>
886  <div class="grid_12">
887  <h3>Loan App Configuration Options</h3>
888  </div>
889  <div class="grid_12">
890  <div id="configOptionsGrid" style="width:100%"></div>
891  </div>
892  <div class="grid_12">
893  <hr>
894  </div>
895  <div class="grid_12">
896  <h3>Loan Applications</h3>
897  </div>
898  </div>
899  <div class="grid_12">
900  <div id="loanAppGrid" style="width:100%"></div>
901  </div>
902  </div>
903 
904 <?php printMonitorPageBottom(); ?>
Definition: User.php:7