Odyssey
lnappPreContent.i
1 <?php
2  /*
3  * hcuPreContent
4  *
5  * Purpose: this should be the main HTML page for home banking PRIOR to any
6  * content being printed.
7  *
8  * Variables: This is a possible list of values that can be set before calling
9  * this script to print on the page
10  *
11  * contentTitle - If entered, a header bar will be printed in the content with
12  * this title
13  *
14  *
15  * TEST FOR the WEB CLient allowing GZIP, deflate for encoding
16  * If it does, then point to the .gz files for each included files
17  */
18 
19  // ** Variables
20 
21  /*
22  * BUILD MENU -- I may need to use the results to help build the page
23  */
24  // ** Loop through the items in menuSite
25  $menuSelectedDetail = '';
26  $printedMainMenu = '';
27  $sitemapDetail = '';
28  $reportPacketError = false;
29 
30  /**
31  * For standard OLB Framework use the IF
32  * the else is a quick bootstrap framework intended to introduce responsive to the site
33  */
34 
35  if (!$serviceLoadMenu) {
36  // ** Not loading menu -- make sure all menu items are false
37  $serviceShowMenu = false;
38  }
39 
40  $acctFailNotify = false;
41  $infoFailNotify = false;
42  $infoDataNotify = false;
43 
44  $infoIconNotify = false;
45  $ucTransactionsCount = 0;
46 
47  $displayLastDataMsg = '';
48 
49  $serviceShowInfo= $serviceViewFromCuAdmin ? false : $serviceShowInfo;
50  $Fplog= "";
51  $Fflog= "";
52  $acctIconNotify= "";
53 
54  // ** Determine if we show the banner.
55  $bannerDiv = '';
56  // ** if we do we will also need to add a class to the body tag
57  if (!$serviceSuppressBanner) {
58  if ((HCU_array_key_value('Fset2', $HB_ENV) & GetFlagsetValue("CU2_SHOWBANNER"))) {
59  // ** Banners are on and not suppressed at the script level
60  $aryBanner = Get_BannerText($dbh, $HB_ENV, $MC, 'D');
61  if ($aryBanner['status']['code'] != '000') {
62  $txtBannerData = '';
63  } else {
64  $aryBannerData = Translate_BannerText($HB_ENV,$aryBanner['banner']['bannertext']);
65  if ($aryBannerData['status']['code'] != '000') {
66  $txtBannerData = '';
67  } else {
68  $txtBannerData = $aryBannerData['banner']['bannertext'];
69  }
70  }
71  if ($txtBannerData != '') {
72  $bannerBodyClass = 'showHomecuBanner';
73  $bannerDiv = "
74  <div id='homecuBannerArea'>
75  {$txtBannerData}
76  </div>
77  ";
78  }
79  }
80  }
81 
82  // copied from LoanApp.prg
83  $cuSettings = Array();
84  $loadSettingsFile = '';
85 
86  if (isset($HB_ENV['chome']) && ($HB_ENV['chome'] != '')) {
87  // * Always load settings file
88  $settingsDir = ($HB_ENV['testmenu'] == '1' ? 'preview' : 'production');
89  $HB_ENV['settingsDir'] = $settingsDir;
90  $loadSettingsFile = "/home/{$HB_ENV['chome']}/public_html/bankingIncludes/{$settingsDir}/hcuSettings.i";
91  if (is_readable($loadSettingsFile)) {
92  // ** Menu Found - Load into an array
93  $fileContent = file_get_contents($loadSettingsFile);
94  // ** Now decode it and hope for the best
95  $cuSettings = HCU_JsonDecode($fileContent);
96  }
97  } else {
98  //** SOMETHING WENT WRONG..
99 
100  }
101 
102 
103  /**
104  * ***********************
105  * BOOTSTRAP TEMP FRAMEWORK
106  * ***********************
107  */
108  header ("Pragma: no-cache");
109  header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
110  header ("Cache-Control: no-cache, no-store, must-revalidate, max_age=0");
111  header ("Expires: 0");
112  header('X-Frame-Options: sameorigin');
113 
114 
115 ?><!DOCTYPE html>
116 <html>
117  <head>
118  <?php if (HCU_array_key_exists('orgname', $HB_ENV) && isset($HB_ENV['orgname'])) : ?>
119  <title><?php echo hcu_displayHtml($HB_ENV['orgname']); ?></title>
120  <? else: ?>
121  <title></title>
122  <? endif; ?>
123  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
124  <meta name="robots" content="noindex,nofollow" />
125  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
126 
127  <meta name="viewport" content="width=device-width, initial-scale=1" />
128  <?php
129  $loadStyleSheet = 'bootstrap';
130 
131  print setIncludeFiles(true, true, $loadStyleSheet, true, $HB_ENV, $MC);
132  ?>
133  <script type="text/javascript" src="https://<?php echo $cloudfrontDomainName; ?>/jquery/js/jquery.populate.js"></script>
134 
135  <script type="text/javascript" src="https://<?php echo $cloudfrontDomainName; ?>/jquery/js/jquery.validity-1.4.6.min.js"></script>
136 
137  <link rel='stylesheet' media='all' type='text/css' href='/eforms/static/css/lnapp.custom.css' />
138 
139  <script>
140 
141  /* Set the width of the side navigation to 250px and the left margin of the page content to 250px and add a black background color to body */
142  function openNav() {
143  $('#body-wrapper').addClass('collapse');
144  $('#body-wrapper').addClass('in');
145  }
146 
147  /* Set the width of the side navigation to 0 and the left margin of the page content to 0, and the background color of body to white */
148  function closeNav() {
149  $('#body-wrapper').removeClass('collapse');
150  $('#body-wrapper').removeClass('in');
151  }
152  function toggleNav() {
153  var menuVisible = ($('#sidebar-nav:visible').length > 0);
154  if (menuVisible) {
155  closeNav();
156  } else {
157  openNav();
158  }
159  }
160 
161  </script>
162 
163 
164  </head>
165  <body>
166  <div id="body-wrapper" class="<?php echo (!$serviceShowInfo ? ' no-show-info ' : '') . (!$serviceShowMenu ? ' no-show-menu ' : '') ; ?> ">
167  <!-- top navbar -->
168  <nav id="header" class="navbar navbar-inverse navbar-static-top" role="navigation" style="margin-bottom: 0px">
169  <div>
170  <div class="navbar-header">
171  <button id="hcu-nav-toggle" onclick="toggleNav()" type="button" class="navbar-toggle collapsed" aria-expanded="false">
172  <span class="sr-only">Toggle navigation</span>
173  <span class="icon-bar"></span>
174  <span class="icon-bar"></span>
175  <span class="icon-bar"></span>
176  </button>
177 
178  <div id="logo-bar">
179  <a class="navbar-brand" href="#">
180  <?php
181  /**
182  *
183  * CUSTOM LOGO LOCATION
184  *
185  * The logo source will need to be added to the hcuSettings.i file. This can be loaded dynamically and then
186  * referenced below. The reason for this is that the logo MUST be in an IMG tag rather than div. The IMG tag
187  * is scalable where as the background in a div is not
188  *
189  */
190  ?>
191  <img alt="Home Banking Logo" class="logo" src="<?php echo $cuSettings['imageLocations']['desktopCULogoLocation']; ?>"/>
192  </a>
193  </div>
194  </div>
195  <ul class="hcu-quick-nav-links navbar-nav nav navbar-top-links navbar-right" id="hcu-navbar-collapse">
196  <li class="">
197  <a href="<?php echo $self; ?>f=portal"><i class="fa fa-home fa-fw"></i></a>
198  </li>
199  <li class="">
200  <a href="<?php echo $self; ?>f=calculators"><i class="fa fa-calculator fa-fw"></i></a>
201  </li>
202  <?php if ($DMSAPP_LOGINTYPE == "" || $DMSAPP_LOGINTYPE == DMSAPP_CONST_APP_LOGIN || $DMSAPP_LOGINTYPE == DMSAPP_CONST_MIR_LOGIN): ?>
203  <li>
204  <a href="<?php echo $self; ?>f=modifyuser"><i class="fa fa-cog fa-fw"></i></a>
205  </li>
206  <?php endif; ?>
207  <li class=""><a href="<?php echo $self; ?>f=signout"><i class="fa fa-power-off fa-fw"></i></a></li>
208  </ul>
209  </div>
210  </nav>
211 
212  <nav id="side-menu" class="navbar-default sidebar sidenav">
213  <div id="sidebar-nav" class="sidebar-nav navbar-collapse ">
214  <!-- SIDEBAR NAV -->
215 
216  </div>
217  </nav>
218  <div id="content-wrapper" class="nothere">
219  <div id="formStatus" class="homecu-formStatus k-block k-error-colored" style='display:none; margin-bottom:10px;max-width:800px;'></div>
220 <!--
221 <div id="summary-container" class="validity-summary-container errors" >
222  <p><em>You may not continue. The following errors were encountered:</em></p>
223  <ul>
224  <li>an unknown error was encountered</li>
225  </ul>
226 </div>
227 -->
228 
229  <div id='hideSubmitWait' style='position:relative; left:-2000px;top:-2000px;'>
230  <div id='homecuSubmitWait' class='k-block' >
231  <div class='k-loading-image'></div>
232  </div>
233  </div>
234  <a href="javascript:void(0)" onclick="closeNav()" x-href="#content-wrapper" class="overlay-close" x-data-toggle="collapse" >&nbsp;</a>
235  <div id="main-container" role="main">
236  <div id="homecu-wrapper">
237  <div id="homecu-container">
238  <div id="homecu-padding-top" class="col-xs-12"></div> <!-- homecu-padding -->