Odyssey
hcuLogin.i
1 <?php
2  /*
3  * File: hcuLogin.i
4  *
5  * Purpose: Authenticate the user login.
6  * Used in current Odyssey platform
7  * This will be replaced with new feature gated login process.
8  *
9  * 11/19 - Moved from hcuLogin.prg into separate include file
10  */
11 
12  // ** INSERT BUSINESS LOGIC FOR THIS FORM
13  // * Set the main link for login
14  $main_url = $HB_ENV['loginpath'] . "/{$HB_ENV['currentscript']}'?{$HB_ENV['cuquery']}";
15 
16  // ** Handle Language for the main login form
17  if (HCU_array_key_exists("homecuLang", $HB_ENV["HCUPOST"]) && $HB_ENV['HCUPOST']['homecuLang'] != '') {
18  // ** They have selected an alternate language ---
19  // ** We will set a new cookie and reset the Flang value
20  if (in_array($HB_ENV['HCUPOST']['homecuLang'], $validLanguageCodes) && trim($HB_ENV['HCUPOST']['homecuLang']) != $HB_ENV['Flang'] && trim($HB_ENV['HCUPOST']['homecuLang']) != '') {
21  // ** Member has SET to see a language and we have confirmed that it is
22  // ** different from what is in Flang
23  $HB_ENV['Flang'] = $HB_ENV['HCUPOST']['homecuLang'];
24  $Flang = $HB_ENV['Flang'];
25  unset($MC);
26 
27  $MC = new hcu_talk_base($Flang);
28 
29  // ** SET THE COOKIE
30  include('hcuSetLang.prg');
31  }
32  }
33  require_once(dirname(__FILE__) . '/../../shared/library/cu_sms.i');
34 
35  $action = HCU_array_key_value("action", $HB_ENV["HCUPOST"]);
36  // handle any AJAX requests (before any output)
37  if ($action == "sendSAC") {
38  header('Content-Type: application/json');
39 
40  try {
41  if (!array_key_exists("sacDeliver", $HB_ENV['HCUPOST'])) {
42  throw new Exception($MC->msg('Invalid entry', HCU_DISPLAY_AS_JS));
43  }
44 
45  // Sanitize username per rules
46  $username = $HB_ENV['HCUPOST']['username'];
47  $allowZeroes = ($HB_ENV["flagset3"] & GetFlagsetValue("CU3_ALLOW_LEAD_ZEROS")) !== 0;
48  if (!$allowZeroes) {
49  $username = preg_replace('/^0*(\d+)$/', '$1', trim($username));
50  }
51 
52  $userrec = GetUserbyName($HB_ENV['dbh'], $HB_ENV['HCUPOST']['cu'], $username);
53  // * generate a new code
54  # might need to get Cu & lookup length + ttl
55  # but right now just use defaults 6 and 1200
56  $authResp = generateAuthcode();
57  if (!$authResp['authcode'] || !$authResp['authexpires']) {
58  throw new Exception('Generate Access Code Failed');
59  }
60  if (!setAuthcode($HB_ENV['dbh'], $HB_ENV, $HB_ENV['MC'], $userrec, $authResp['authcode'], $authResp['authexpires'])) {
61  throw new Exception('Save Access Code Failed');
62  }
63  if (!sendAuthcode($HB_ENV['dbh'], $HB_ENV, $userrec, HCU_array_key_value('sacDeliver', $HB_ENV['HCUPOST']))) {
64  throw new Exception('Send Access Code Failed');
65  }
66 
67  $aryReply = array("result" => TRUE, "message" => $MC->msg('Success', HCU_DISPLAY_AS_JS));
68  } catch (Exception $err) {
69  if ($err->getCode() == 2) {
70  $aryReply = array("result" => FALSE, "message" => $MC->msg('Invalid entry', HCU_DISPLAY_AS_JS) . ' ' . $MC->msg('Error', HCU_DISPLAY_AS_JS));
71  } else {
72  $aryReply = array("result" => FALSE, "message" => $err->getMessage() . ' ' . $MC->msg('Error', HCU_DISPLAY_AS_JS));
73  }
74 
75  }
76  print HCU_JsonEncode($aryReply);
77  exit;
78  }
79 
80  // ** There are multiple stages to the login screen..
81  // * based on whether cookies are already enabled or if the
82  $loginstatus_ary = Array('status' => '', 'dispmsg' => '', 'nextstep' => '');
83  /*
84  * Home Page Cookie setting -- IF I am coming from a homepage, I need to OVERWRITE
85  * whatever is in the tx_muri, to ensure the destination is what I expect..
86  * This is done by setting cupg to 1 in the mobile file. Similar to it being
87  * set on homepages for desktop
88  */
89  //$addr_override = (intval($HB_ENV['HCUPOST']['cupg']) == 1 ? 1 : 0);
90  // * NO longer care how they got here. WE ALWAYS redirect to the hcuAccounts page
91  $addr_override = 1;
92  $return_address = GetReturnAddress($HB_ENV, $addr_override);
93  $pwdchgCookieName = "PWDCHG";
94 
95  if ($HB_ENV['offline'] == "Y") {
96  // ** ERROR MESSAGE -- FEATURE UNAILABLE
97  $loginstatus_ary['status'] = "999";
98  $loginstatus_ary['dispmsg'][] = $MC->msg("Feature Unavailable", HCU_DISPLAY_AS_HTML);
99  $loginstatus_ary['nextstep'] = "StepError";
100  }
101 
102  // ** Determine if we will be showing the 'MEMBER ENROLL' link
103  $show_enrollment_link = "";
104  if ($HB_ENV['flagset3'] & $CU3_SHOW_ENROLL) {
105  $show_enrollment_link = <<< ENDSCRIPT
106  <div id='enroll-block' class=''>
107  <div class="col-xs-12">
108  <h4 class="h4">{$MC->msg("New To Home Banking", HCU_DISPLAY_AS_HTML)}</h4>
109  </div>
110  <div class="col-xs-12 col-sm-4 col-md-5">
111  <a class='hcu-link btn-block hcu-xs-btn-pad' href="{$HB_ENV['loginpath']}/hcuActivate.prg?{$HB_ENV['cuquery']}">{$MC->msg("Enroll Now", HCU_DISPLAY_AS_HTML)}</a>
112  </div>
113  </div>
114 ENDSCRIPT;
115  }
116 
117  // ** LOGIN POST **
118  // ** SETUP POSTED values for validation
119  // * The user may be using 'Legacy' OR '2-Factor' authentication
120  // * they differ slightly
121  $set_form_qid_resp = "";
122  $set_form_sac_resp = "";
123  if ($loginstatus_ary['nextstep'] == '') {
124  /* LEGACY USERNAME/PASSWORD ONLY AUTHENTICATION NO LONGER SUPPORTED */
125 
126  // * Pieces that are needed
127  if (HCU_array_key_exists("btnLogin", $HB_ENV["HCUPOST"]) && $HB_ENV['HCUPOST']['btnLogin'] != '') {
128  // Sanitize username per rules
129  $username = $HB_ENV['HCUPOST']['username'];
130  $allowZeroes = ($HB_ENV["flagset3"] & GetFlagsetValue("CU3_ALLOW_LEAD_ZEROS")) !== 0;
131  if (!$allowZeroes) {
132  $username = preg_replace('/^0*(\d+)$/', '$1', trim($username));
133  }
134 
135  // ** username
136  $HB_ENV['username'] = $username;
137 
138  // ** email
139  $HB_ENV['email'] = HCU_array_key_value("email", $HB_ENV['HCUPOST']);
140 
141  if (!($HB_ENV['flagset3'] & $GLOBALS['CU3_MFA_AUTHCODE'])) {
142  // ** CHALLENGE QUESTIONS
143  // * Either answers from qid elements
144  // * OR
145  // * a secret hash in respqid
146  // ** When the key is saved, an extra random number will be saved
147  // * as cookie, it will be part of hash, to help protect against
148  // * further use of the hash
149  //
150  foreach ($HB_ENV['HCUPOST'] as $post_key => $post_value) {
151  // * Find the POSTED values that start with qid
152  if (substr($post_key, 0, 3) == 'qid') {
153  // ** OKAY we have the values -- this is a qid response
154  $HB_ENV['challengeresponses'][$post_key] = $post_value;
155  }
156  }
157  if (!empty($HB_ENV['challengeresponses'])) {
158  $set_form_qid_resp = htmlentities(serialize($HB_ENV['challengeresponses']));
159  }
160  // ** Check to see if the challengerespones is empty -- if so, then
161  // * test for the quid responses hash
162  if (empty($HB_ENV['challengeresponses']) && HCU_array_key_value("respqid", $HB_ENV['HCUPOST'])) {
163  // ** The value appears to be set, so it will be decrytped
164  // * it will use the {COOKIE RANDOM NUMBER}{HASHKEY} to decrypt
165  // * After decrypting, it should be a serialized value -- store it in the
166  // * challengesresponses array of HB_ENV
167  // $results = mcrypt_decrypt($main_url, $key, $data, $mode)
168 
169  $results = $HB_ENV['HCUPOST']['respqid'];
170  $random_nbr = Return_Random4Challenge($HB_ENV);
171  $results = html_entity_decode(hcu_decrypturl($results, $random_nbr . $HB_ENV['2factorkey']));
172 
173  // ** WE HAVE DECRYPTED -- IF SERIALIZED - THEN UNWRAP
174  if (hcuIsSerializedString($results)) {
175  $HB_ENV['challengeresponses'] = unserialize($results);
176  $set_form_qid_resp = htmlentities(serialize($HB_ENV['challengeresponses']));
177  }
178  // ** Create the value to INSERT into the StepPass form later
179  // ** RESET THE PWDCHG COOKIE
180  HCU_setcookie_env($HB_ENV['SYSENV'], $pwdchgCookieName, "", 0);
181  }
182  } else {
183  // ** secure access code
184  $HB_ENV['authcode'] = HCU_array_key_value('authcode', $HB_ENV['HCUPOST']);
185  if (!empty($HB_ENV['authcode'])) {
186  $set_form_sac_resp = htmlentities(serialize($HB_ENV['authcode']));
187  }
188  // ** Check to see if the secure access code SAC is empty -- if so, then
189  // * test for the SAC response hash
190  if (empty($HB_ENV['authcode']) && HCU_array_key_value('respsac', $HB_ENV['HCUPOST']) != '') {
191  // ** The value appears to be set, so it will be decrytped
192  // * it will use the {COOKIE RANDOM NUMBER}{HASHKEY} to decrypt
193  // * After decrypting, store it in the respsac of HB_ENV
194 
195  $results = $HB_ENV['HCUPOST']['respsac'];
196  $random_nbr = Return_Random4Challenge($HB_ENV);
197  $results = html_entity_decode(hcu_decrypturl($results, $random_nbr . $HB_ENV['2factorkey']));
198 
199  // ** WE HAVE DECRYPTED -- IF SERIALIZED - THEN UNWRAP
200  if (hcuIsSerializedString($results)) {
201  $HB_ENV['authcode'] = unserialize($results);
202  $set_form_sac_resp = htmlentities(serialize($HB_ENV['authcode']));
203  }
204  // ** Create the value to INSERT into the StepPass form later
205  // ** RESET THE PWDCHG COOKIE
206  HCU_setcookie_env($HB_ENV['SYSENV'], $pwdchgCookieName, "", 0);
207  }
208  }
209 
210  // ** password
211  $HB_ENV['password'] = HCU_array_key_value("password", $HB_ENV['HCUPOST']);
212  $loginstatus_ary = BankingVerifyCredentials($dbh, "Chk2Factor", $HB_ENV, $MC, "DSK");
213 
214 // ** Need some sort of ChkAccess -- This is a Access Check ONLY -- need different ChkAccess Chk2Factor
215  } else {
216  // * We are here by mistake..
217  // ** WE SHOULD ALWAYS get a btnLogin submitted
218  // * From mobile web page as well
219  // ** So if here -- we force to the member screen
220  $loginstatus_ary['status'] = "100";
221  $loginstatus_ary['dispmsg'][] = "";
222  $loginstatus_ary['nextstep'] = "StepMember";
223  }
224  }
225 
226  // ** Handle here if the status is StepNone OR not recognized value
227  if ($loginstatus_ary['nextstep'] == 'StepNone') {
228  // see if need to set a cookie for the profileRequire update
229  if (($HB_ENV["Ffchg"] == "Y") ||
230  ($HB_ENV['Fset2'] & $CU2_ALIAS_REQ) ||
231  ($HB_ENV['Fmsg_tx'] & $EMAIL_FLAG) ||
232  ($HB_ENV['Ffreset'] > 0)) {
233  $retryCount = $HB_ENV["failedremain"];
234  $timeExpires = time() + $HB_ENV['SYSENV']['ticket']['expires'];
235  $hashedValue = md5($retryCount . $timeExpires . $HB_ENV["secret"]);
236  $profileCookie = "remain=$retryCount&until=$timeExpires&check=$hashedValue";
237 
238  HCU_setcookie_env($HB_ENV['SYSENV'], "securePass", $profileCookie, 0);
239  }
240 
241  header("Location: $return_address");
242  exit;
243  }
244 
245 
246  // ** Load any fragments here
247  // ** the fragments should be common for ANY of the options..
248  // ** SET VARIABLES FOR WEBSITE FLAGS
249  $contentTitle = $HB_ENV['pname'];
250 
251  if (in_array($loginstatus_ary['nextstep'], Array("StepMember")) === true) {
252  $serviceShowLanguage = true;
253  }
254  // ** INCLUDE PRE CONTENT SCRIPT
255  require_once(dirname(__FILE__) . '/../includes/hcuPreContent.i');
256 
257  /*
258  * ** START CONTENT
259  */
260 
261  $progressStep = -1;
262  switch ($loginstatus_ary['nextstep']) {
263  case 'StepMember':
264  $progressStep = 1;
265  break;
266  case 'StepEmail':
267  $progressStep = 2;
268  break;
269  case 'StepChallenge':
270  $progressStep = 3;
271  break;
272  case 'StepSecureAccess':
273  $progressStep = 3;
274  break;
275  case 'StepPass':
276  $progressStep = 4;
277  break;
278  }
279 
280  /*
281  * Need to setup the Login ID Text.
282  * Based on settings for the credit union in Monitor, they will either be entering
283  * a 'Login ID' or an 'Account Number'
284  *
285  *
286  */
287 
288  // TODO: for Odyssey, shouldn't this always be 'Login ID'?
289 
290  if (($HB_ENV['flagset2'] & $GLOBALS['CU2_ALIAS_REQ']) > 0 || (($HB_ENV['flagset2'] & $GLOBALS['CU2_ALIAS_OK']) > 0)) {
291  // ** The Credit union IS setup for some form of user alias, required OR allowed
292  // * The member will be asked for Login ID
293  $hbLoginText = $MC->msg('Login ID', HCU_DISPLAY_AS_HTML);
294  $hbLoginValMsg = $MC->msg('Login Enter Login', HCU_DISPLAY_AS_HTML);
295  $hbLoginHelp = "<span class='' id='loginTip'><i class='fa fa-question-circle-o'></i></span>";
296  } else {
297  // ** The Credit union does not have any alias set.
298  // * the member will be asked for Account Number
299  $hbLoginText = $MC->msg('Account Number', HCU_DISPLAY_AS_HTML);
300  $hbLoginValMsg = $MC->msg('Login Enter Account', HCU_DISPLAY_AS_HTML);
301  $hbLoginHelp = "";
302  }
303 
304  $hbLoginTitle = <<< LOGINTITLE
305  <div class="form-group">
306  <div class="col-xs-12">
307  <h4 class="h4 hcuSpacerx">{$MC->msg('Login Title', HCU_DISPLAY_AS_HTML)}</h4>
308  </div>
309  </div>
310 LOGINTITLE;
311 
312  // * The login script allows for two different CMS Fragments
313  // * an aside message/notice/image and a notice to go under the login information.
314  //
315  // * Those notices may be set here
316  $loginNoticeAry = Get_NoticeInfo($dbh, $HB_ENV, $MC, "D", "loginNotice");
317  $loginPromoAry = Get_NoticeInfo($dbh, $HB_ENV, $MC, "D", "LoginPromo");
318 ?>
319 <style>
320  .hcuSpacer { margin-bottom: 7px; }
321  #loginProgress {
322  width: 100%;
323  }
324 </style>
325 <div class="container-fluid">
326  <div class="row">
327  <?php
328  $progressBar= "";
329  if ($progressStep >= 0):
330  $progressCaptions = Array($hbLoginText,
331  $MC->msg("Additional Authentication", HCU_DISPLAY_AS_HTML),
332  $MC->msg("Additional Authentication", HCU_DISPLAY_AS_HTML),
333  $MC->msg("Password", HCU_DISPLAY_AS_HTML));
334  $progressBar .= '
335  <div id="progress-frame" class="hcu-all-100">
336  <div id="loginProgress"></div>
337  <!--
338  <h2 class="h4">' . $progressCaptions[$progressStep - 1] . '</h2>
339  <div class="progress-caption">
340  <div class="column end"><p><span class=" ">' . $hbLoginText . '</span></p></div>
341  <div class="column mid"><p><span class=" ">' . $MC->msg("Additional Authentication", HCU_DISPLAY_AS_HTML) . '</span></p></div>
342  <div class="column end"><p><span class=" ">' . $MC->msg('Password', HCU_DISPLAY_AS_HTML) . '</span></p></div>
343  </div>
344  -->
345  </div>
346  <script>
347  var loginProgress;
348  $(document).ready(function() {
349  loginProgress = $("#loginProgress").kendoProgressBar({
350  type: "value",
351  chunkCount: 4,
352  min: 0,
353  max: 4,
354  value: ' . $progressStep . '
355  }).data("kendoProgressBar");
356  loginProgress.progressStatus.text("(' . $progressStep . '/' . count($progressCaptions) . ')");
357  });
358  </script>
359  ';
360  endif;
361 
362  $hasPromo = false;
363  if ($loginPromoAry['status']['code'] === '000' && count($loginPromoAry['notice']) > 0):
364  $hasPromo = true;
365 
366  $truePromo = $loginPromoAry["notice"][0]["notice_text"];
367 
368  endif;
369  ?>
370 
371  <?php /** START OF DIFFERENT LOGIN SCREENS * */
372 
373  switch ($loginstatus_ary['nextstep']):
374  case 'StepMember':
375  ?>
376  <div class="k-content col-xs-12 col-md-8 col-md-offset-2 col-lg-6 hcu-template" id='login-entry'>
377 
378  <div class="hcu-all-100">
379  <?php echo $progressBar; ?>
380  </div>
381  <form id='frmLogin' method="post" action="<?php echo $HB_ENV['loginpath'] . "/" . $HB_ENV['currentscript'] . "?" . $HB_ENV['cuquery']; ?>" role="form">
382  <input type='hidden' name="cu" value="<?php echo $HB_ENV['HCUPOST']['cu']; ?>" />
383  <div id='main-login-well' class="well well-sm ">
384  <div class="form-horizontal form-widgets">
385  <?php echo $hbLoginTitle; ?>
386  <div class="form-group hcuSpacer">
387  <label class="col-xs-12" for="username"><?php echo $hbLoginValMsg . '&nbsp;' . $hbLoginHelp ?></label>
388  <div class="col-xs-12 col-sm-6 col-md-8">
389  <input id="username" data-placeholder="<?php echo $hbLoginValMsg; ?>" name="username" type="text" class="k-textbox k-autocomplete hcu-all-100" required validationMessage="<?php echo $hbLoginValMsg; ?>" autocomplete="off"/>
390  </div>
391  </div>
392  </div>
393  </div>
394  <div class="hcu-edit-buttons k-state-default">
395  <?php if ($HB_ENV['flagset'] & $CU_MEMRESET) { ?>
396  <span class="hcu-icon-delete">
397  <a href="<?php echo $HB_ENV['loginpath'] . '/hcuResetPwd.prg?' . $HB_ENV['cuquery']; ?>">
398  <?php echo $MC->msg('Forgot your password', HCU_DISPLAY_AS_HTML); ?>
399  </a>
400  </span>
401  <?php } ?>
402  &emsp;
403  <button href="##" id="btnLogin" name="btnLogin" class="k-button k-primary" type="submit" value="Log In">
404  <i class="fa fa-lock fa-lg"></i><?php echo $MC->msg("Continue", HCU_DISPLAY_AS_HTML); ?>
405  </button>
406  </div>
407 
408  <!--// ** Determine if we will be showing the 'MEMBER ENROLL' link-->
409  <?php if ($HB_ENV['flagset3'] & $CU3_SHOW_ENROLL): ?>
410  <div id='signup-login-well' class="well well-sm ">
411  <div class="form-horizontal form-widgets">
412  <div class="form-group">
413  <div id='enroll-block' class=''>
414  <div class="col-xs-12">
415  <h4 class="h4"><?php echo $MC->msg("New To Home Banking", HCU_DISPLAY_AS_HTML); ?></h4>
416  </div>
417  <div class="col-xs-12 col-sm-4 col-md-5">
418  <a class='hcu-link btn-block hcu-xs-btn-pad' href="<?php echo $HB_ENV['loginpath'] . "/hcuActivate.prg?" . $HB_ENV['cuquery'] ?>"><?php echo $MC->msg("Enroll Now", HCU_DISPLAY_AS_HTML); ?></a>
419  </div>
420  </div>
421  </div>
422  </div>
423  </div>
424  <?php endif; ?>
425  </form>
426  </div>
427  <script>
428  $(document).ready(function () {
429  <?php if (strlen($hbLoginHelp) > 0) { ?>
430  homecuTooltip.bind({loginTip: "<?php echo $MC->msg("Username NoBypass", HCU_DISPLAY_AS_JS) ?>"});
431  <?php } ?>
432  });
433  </script>
434  <?php
435  break;
436  case 'StepEmail':
437  ?>
438  <div class="k-content col-xs-12 col-md-8 col-md-offset-2 col-lg-6 hcu-template" id='login-entry'>
439  <div id="formLoginStatus" class="homecu-formStatus k-block k-error-colored" style='display:none;'></div>
440  <div class="hcu-all-100">
441  <?php echo $progressBar; ?>
442  </div>
443  <form id='frmLogin' method="post" action="<?php echo $HB_ENV['loginpath'] . "/" . $HB_ENV['currentscript'] . "?" . $HB_ENV['cuquery']; ?>" role="form">
444  <input type='hidden' name="cu" value="<?php echo $HB_ENV['HCUPOST']['cu']; ?>"/>
445  <input type='hidden' name="username" value="<?php echo $HB_ENV['username']; ?>"/>
446 
447  <div id='main-login-well' class="well well-sm ">
448  <div class="form-horizontal form-widgets">
449  <?php echo $hbLoginTitle; ?>
450 
451 
452  <div class="form-group ">
453  <div class="col-xs-12" >
454  <div class="k-block hcu-login-block">
455  <div class="hcu-summary-block">
456  <div class="summary-desc">
457  <div class="form-group">
458  <label class="col-xs-12"><?php echo $hbLoginText ?></label>
459  <div class="col-xs-12" >
460  <p class=""><?php echo $HB_ENV['username']; ?></p>
461  </div>
462  </div>
463  </div>
464  </div>
465  </div>
466  </div>
467  </div>
468 
469  <div class="form-group hcuSpacer">
470  <label for="email" class='required col-xs-12'><?php echo $MC->msg('Confirm Email Address', HCU_DISPLAY_AS_HTML); ?></label>
471  <div class="col-xs-12 col-sm-6 ">
472  <input type="email" class='k-textbox k-autocomplete hcu-all-100' data-placeholder="<?php echo $MC->msg('Email Address', HCU_DISPLAY_AS_HTML); ?>" id="email"
473  name="email" maxlength="50" required
474  data-required-msg="<?php echo $MC->msg('Email Address', HCU_DISPLAY_AS_HTML) . ' ' . $MC->msg('is a Required Field', HCU_DISPLAY_AS_HTML); ?>"
475  data-email-msg='<?php echo $MC->msg('Email appears invalid', HCU_DISPLAY_AS_HTML); ?>'
476  autocomplete="off"/>
477  </div>
478  </div>
479  </div>
480  </div>
481  <div class="hcu-edit-buttons k-state-default">
482  <a href="##" id="btnStartOver" name="btnStartOver"><?php print $MC->msg('Start Over', HCU_DISPLAY_AS_HTML); ?></a>
483  &emsp;
484  <button href="##" id="btnLogin" name="btnLogin" class="k-button k-primary" type="submit" value="Log In">
485  <i class="fa fa-lock fa-lg"></i><?php echo $MC->msg("Continue", HCU_DISPLAY_AS_HTML); ?>
486  </button>
487  </div>
488  </form>
489  </div>
490 
491  <?php
492  break;
493  case 'StepChallenge':
494  $HB_ENV['HCUPOST']['Flang'] = $HB_ENV['Flang'];
495  $MemberChallengeQuestions_ary = GetChallengeQuestions("CHALLENGE", $dbh, $HB_ENV, $MC, $HB_ENV['username']);
496  ?>
497  <div class="k-content col-xs-12 col-md-8 col-md-offset-2 col-lg-6 hcu-template" id='login-entry'>
498  <div id="formLoginStatus" class="homecu-formStatus k-block k-error-colored" style='display:none;'></div>
499  <div class="hcu-all-100">
500  <?php echo $progressBar; ?>
501  </div>
502 
503  <form id='frmLogin' method="post" action="<?php echo $HB_ENV['loginpath'] . "/" . $HB_ENV['currentscript'] . "?" . $HB_ENV['cuquery']; ?>" role="form">
504 
505  <input type='hidden' name="cu" value="<?php echo $HB_ENV['HCUPOST']['cu']; ?>"/>
506  <input type='hidden' name="username" value="<?php echo $HB_ENV['username']; ?>"/>
507  <input type='hidden' name="email" value="<?php echo $HB_ENV['HCUPOST']['email']; ?>"/>
508  <div id='main-login-well' class="well well-sm ">
509  <div class="form-horizontal form-widgets">
510  <?php echo $hbLoginTitle; ?>
511 
512  <div class="form-group ">
513  <div class="col-xs-12" >
514  <div class="k-block hcu-login-block">
515  <div class="hcu-summary-block">
516  <div class="summary-desc">
517  <div class="form-group">
518  <label class="col-xs-12"><?php echo $hbLoginText ?></label>
519  <div class="col-xs-12" >
520  <p class=""><?php echo $HB_ENV['username']; ?></p>
521  </div>
522  </div>
523  </div>
524  </div>
525  </div>
526  </div>
527  </div>
528 
529  <div class="form-group">
530  <div class="col-xs-12">
531  <h4 class="h4"><?php echo $MC->msg('Login Enter Challenge', HCU_DISPLAY_AS_HTML); ?></h4>
532  </div>
533  </div>
534  <?php
535  $qcnt = 0;
536  foreach ($MemberChallengeQuestions_ary as $question_ary):
537  $qcnt++;
538  ?>
539 
540  <div class="form-group">
541  <label class="col-xs-12" for="qid<?php echo $question_ary['cqid']; ?>" ><?php echo $question_ary['display']; ?></label>
542 
543  <div class="col-xs-12 col-sm-8">
544  <input type="text" class='k-input k-textbox k-autocomplete hcu-all-100' id="qid<?php echo $question_ary['cqid']; ?>"
545  name="qid<?php echo $question_ary['cqid']; ?>" maxlength="50" required
546  data-required-msg='<?php echo $MC->combo_msg('Set Config Question Blank', HCU_DISPLAY_AS_HTML, '#num#', $qcnt); ?>'
547  autocomplete="off"
548  />
549  </div>
550  </div>
551  <?php endforeach; ?>
552 
553 
554  <div id="pubpriv" class="form-horizontal form-widgets">
555  <h4 class="h4"><?php echo $MC->msg('Should We Remember This', HCU_DISPLAY_AS_HTML); ?></h4>
556  <div class="radio">
557  <label for="chksecureY">
558  <input type="radio" name="chksecure" id="chksecureY" value="Y" data-bind="checked: chksecure" required data-homecuCustomRadio-msg="<?php echo $MC->msg('Remember Error', HCU_DISPLAY_AS_HTML); ?>">
559  <span><?php echo $MC->msg('Remember Yes', HCU_DISPLAY_AS_HTML); ?></span><br>
560  <span class="hcu-secondary"><span class="hcu-secondary-text"><?php echo $MC->msg('Remember Yes Message', HCU_DISPLAY_AS_HTML); ?></span></span>
561  </label>
562  </div>
563  <div class="radio">
564  <label for="chksecureN">
565  <input type="radio" name="chksecure" id="chksecureN" value="N" data-bind="checked: chksecure" required data-homecuCustomRadio-msg="<?php echo $MC->msg('Remember Error', HCU_DISPLAY_AS_HTML); ?>">
566  <span><?php echo $MC->msg('Remember No', HCU_DISPLAY_AS_HTML); ?></span><br>
567  <span class="hcu-secondary"><span class="hcu-secondary-text"><?php echo $MC->msg('Remember No Message', HCU_DISPLAY_AS_HTML); ?></span></span>
568  </label>
569  </div>
570  </div>
571 
572  </div>
573  </div>
574 
575  <div class="hcu-edit-buttons k-state-default">
576  <a href="##" id="btnStartOver" name="btnStartOver"><?php print $MC->msg('Start Over', HCU_DISPLAY_AS_HTML); ?></a>
577  &emsp;
578  <button href="##" id="btnLogin" name="btnLogin" class="k-button k-primary" type="submit" value="Log In">
579  <i class="fa fa-lock fa-lg"></i><?php echo $MC->msg("Continue", HCU_DISPLAY_AS_HTML); ?>
580  </button>
581  </div>
582  </form>
583  </div>
584  <script>
585  $(document).ready(function () {
586  homecuTooltip.bind({showTooltipPrivate: "<?php echo $MC->msg('Remember Me Secure Only', HCU_DISPLAY_AS_JS); ?>"});
587  $.homecuValidator.settings.formErrorTitle = '<?php echo $MC->msg('Error Occurred', HCU_DISPLAY_AS_JS); ?>';
588  });
589  </script>
590  <?php
591  break;
592  case 'StepSecureAccess':
593  $HB_ENV['HCUPOST']['Flang'] = $HB_ENV['Flang'];
594  $MemberContacts_ary = GetUserContacts($dbh, $HB_ENV, GetUserbyName($dbh, $HB_ENV['HCUPOST']['cu'], $HB_ENV['username']));
595 
596  ?>
597  <div class="k-content col-xs-12 col-md-8 col-md-offset-2 col-lg-6 hcu-template" id='login-entry'>
598  <div id="formLoginStatus" class="homecu-formStatus k-block k-error-colored" style='display:none;'></div>
599  <div class="hcu-all-100">
600  <?php echo $progressBar; ?>
601  </div>
602 
603  <form id='frmLogin' method="post" action="<?php echo $HB_ENV['loginpath'] . "/" . $HB_ENV['currentscript'] . "?" . $HB_ENV['cuquery']; ?>" role="form">
604  <input type='hidden' name="cu" value="<?php echo $HB_ENV['HCUPOST']['cu']; ?>"/>
605  <input type='hidden' name="username" value="<?php echo $HB_ENV['username']; ?>"/>
606  <input type='hidden' name="email" value="<?php echo $HB_ENV['HCUPOST']['email']; ?>"/>
607  <div id='main-login-well' class="well well-sm ">
608  <div class="form-horizontal form-widgets">
609  <?php echo $hbLoginTitle; ?>
610  <div class="form-group ">
611  <div class="col-xs-12" >
612  <div class="k-block hcu-login-block">
613  <div class="hcu-summary-block">
614  <div class="summary-desc">
615  <div class="form-group">
616  <label class="col-xs-12"><?php echo $hbLoginText ?></label>
617  <div class="col-xs-12" >
618  <p class=""><?php echo $HB_ENV['username']; ?></p>
619  </div>
620  </div>
621  </div>
622  </div>
623  </div>
624  </div>
625  </div>
626 
627  <div class="form-horizontal form-widgets">
628  <div class="form-group hcuSpacer" id="enterAuth" hidden="true">
629  <label for="authcode" class='required col-xs-12'><?php echo $MC->msg('Enter Access Code', HCU_DISPLAY_AS_HTML); ?></label>
630  <div class="col-xs-12 col-sm-6 ">
631  <input type="text" pattern="[0-9]*" inputmode="numeric" class='k-textbox k-autocomplete hcu-all-100' data-placeholder="<?php echo $MC->msg('Access Code', HCU_DISPLAY_AS_HTML); ?>" id="authcode"
632  name="authcode" maxlength="10" required
633  data-pattern-msg='<?php echo $MC->msg('Access code invalid', HCU_DISPLAY_AS_HTML); ?>'
634  data-required-msg="<?php echo $MC->msg('Access Code', HCU_DISPLAY_AS_HTML) . ' ' . $MC->msg('is a Required Field', HCU_DISPLAY_AS_HTML); ?>"
635  data-authcode-Emsg='<?php echo $MC->msg('Access code expired', HCU_DISPLAY_AS_HTML); ?>'
636  data-authcode-Imsg='<?php echo $MC->msg('Access code invalid', HCU_DISPLAY_AS_HTML); ?>'
637  autocomplete="off"/>
638  </div>
639  <div class="col-xs-12">
640  <a id="showSAC" class="hcu-link hcu-all-100 hcu-xs-btn-margin-top hcu-xs-btn-pad local-cursor-pointer"><?php echo $MC->msg('Access Code Needed', HCU_DISPLAY_AS_HTML); ?></a>
641  <br/><br/>
642  </div>
643  </div>
644  <div id="getSAC" class="form-group">
645  <div class="col-xs-12">
646  <h4 class="h4 hcuSpacerx"><?php echo $MC->msg('Login Select SAC Destination', HCU_DISPLAY_AS_HTML); ?></h4>
647  </div>
648  <?php if (is_array($MemberContacts_ary['EMAIL']) && sizeof($MemberContacts_ary['EMAIL'])) { ?>
649  <label class="col-xs-12"><?php echo $MC->msg('Email to', HCU_DISPLAY_AS_HTML); ?></label>
650  <?php
651  $ccnt = 0;
652  foreach ($MemberContacts_ary['EMAIL'] as $ckey => $cval) :
653  $ccnt++;
654  ?>
655  <div class="col-xs-12 radio local-radio-options">
656  <label for="sac_deliver_e<?php echo $ccnt; ?>" style='cursor: pointer'><input type="radio" name="sac_deliver" id="sac_deliver_e<?php echo $ccnt; ?>" value="<?php echo $ckey; ?>" />
657  <?php echo "$cval"; ?>
658  </label>
659  <br/>
660  </div>
661  <?php endforeach; ?>
662  <div id="sac-deliver-email-spam" class="col-xs-12">
663  <div class="well well-sm local-spam-div">
664  <span class="local-spam-icon">
665  <i class="fa fa-envelope fa-2x hcu-notice-text-color" aria-hidden="true"></i>
666  </span>
667  <p class="local-spam-font">
668  <?php echo $MC->msg('Login SAC Spam', HCU_DISPLAY_AS_HTML); ?>
669  </p>
670  </div>
671  </div>
672  <?php } ?>
673 
674  <?php if (is_array($MemberContacts_ary['SMS']) && sizeof($MemberContacts_ary['SMS'])) { ?>
675  <label class="col-xs-12"><?php echo $MC->msg('Text to', HCU_DISPLAY_AS_HTML); ?></label>
676  <?php
677  $ccnt = 0;
678  foreach ($MemberContacts_ary['SMS'] as $ckey => $cval) :
679  $ccnt++;
680  ?>
681  <div class="col-xs-12 radio local-radio-options">
682  <label for="sac_deliver_s<?php echo $ccnt; ?>" style='cursor: pointer'><input type="radio" name="sac_deliver" id="sac_deliver_s<?php echo $ccnt; ?>" value="<?php echo $ckey; ?>" />
683  <?php echo "$cval"; ?>
684  </label>
685  <br/>
686  </div>
687  <?php endforeach;
688  } ?>
689 
690  <?php $hideSAC = ($MemberContacts_ary['GotIt'] ? "" : 'local-btn-hidden"'); ?>
691  <div id="divSAC" class="col-xs-12 col-sm-6">
692  <button id="sendSAC" name='sendSAC' type="button" class="k-button k-primary hcu-xs-btn-margin-top hcu-xs-btn-pad" value="Send Code"><i class='fa fa-send-o fa-lg'></i><?php echo $MC->msg('Get Access Code', HCU_DISPLAY_AS_HTML); ?></button>
693  </div>
694  <div class="col-xs-12 col-sm-4 btn btn-link">
695  <a id="gotSAC" class="hcu-link hcu-all-100 hcu-xs-btn-margin-top hcu-xs-btn-pad btn-block local-cursor-pointer <?php echo "$hideSAC"; ?> "> <?php echo $MC->msg('Access Code In Hand', HCU_DISPLAY_AS_HTML); ?></a>
696  </div>
697  </div>
698  </div>
699  </div>
700 
701  <div id="pubpriv" hidden="true" class="form-horizontal form-widgets">
702  <h4 class="h4"><?php echo $MC->msg('Should We Remember This', HCU_DISPLAY_AS_HTML); ?></h4>
703  <div class="radio">
704  <label for="chksecureY">
705  <input type="radio" name="chksecure" id="chksecureY" value="Y" data-bind="checked: chksecure" required data-homecuCustomRadio-msg="<?php echo $MC->msg('Remember Error', HCU_DISPLAY_AS_HTML); ?>">
706  <span><?php echo $MC->msg('Remember Yes', HCU_DISPLAY_AS_HTML); ?></span><br>
707  <span class="hcu-secondary"><span class="hcu-secondary-text"><?php echo $MC->msg('Remember Yes Message', HCU_DISPLAY_AS_HTML); ?></span></span>
708  </label>
709  </div>
710  <div class="radio">
711  <label for="chksecureN">
712  <input type="radio" name="chksecure" id="chksecureN" value="N" data-bind="checked: chksecure" required data-homecuCustomRadio-msg="<?php echo $MC->msg('Remember Error', HCU_DISPLAY_AS_HTML); ?>">
713  <span><?php echo $MC->msg('Remember No', HCU_DISPLAY_AS_HTML); ?></span><br>
714  <span class="hcu-secondary"><span class="hcu-secondary-text"><?php echo $MC->msg('Remember No Message', HCU_DISPLAY_AS_HTML); ?></span></span>
715  </label>
716  </div>
717  </div>
718  </div>
719 
720  <div class="hcu-edit-buttons k-state-default">
721  <a href="##" id="btnStartOver" name="btnStartOver"><?php print $MC->msg('Start Over', HCU_DISPLAY_AS_HTML); ?></a>
722  &emsp;
723  <button href="##" id="btnLogin" name="btnLogin" class="k-button k-primary local-btn-hidden" type="submit" value="Log In">
724  <i class="fa fa-lock fa-lg"></i><?php echo $MC->msg("Continue", HCU_DISPLAY_AS_HTML); ?>
725  </button>
726  </div>
727  <br/><br/>
728  </form>
729  </div>
730  <script>
731  $(document).ready(function () {
732  homecuTooltip.bind({showTooltipPrivate: "<?php echo $MC->msg('Remember Me Secure Only', HCU_DISPLAY_AS_JS); ?>"});
733  $.homecuValidator.settings.formErrorTitle = '<?php echo $MC->msg('Error Occurred', HCU_DISPLAY_AS_JS); ?>';
734 
735  $('input[id^="sac_deliver_e"]').click(function() {
736  $('#sac-deliver-email-spam').show();
737  });
738  $('input[id^="sac_deliver_s"]').click(function() {
739  $('#sac-deliver-email-spam').hide();
740  });
741  });
742  </script>
743  <style>
744  #sac-deliver-email-spam {
745  display: none;
746  }
747  .local-spam-icon {
748  float: left;
749  margin-right: 10px;
750  }
751  .local-spam-font {
752  font-size: .8em;
753  margin-bottom: 0px;
754  }
755  </style>
756 
757  <?php
758  break;
759  case 'StepPass':
760  // ** Here IF -- there is challenge question response we will create a Cookie
761  // * to temporarily hold a pin that will be used in crypting the challenge question
762  // * responses
763  if ($set_form_qid_resp != "") {
764  $random_nbr = rand(1000, 9999);
765 
766  $cookieexpires = time() + (60 * 15); // * FIFTEEN MINUTE WINDOW TO POST
767  $p3 = MD5($HB_ENV['secret'] . MD5(join(':', array($random_nbr, $cookieexpires))));
768  $cookievalue = "p1={$random_nbr}&p2={$cookieexpires}&p3={$p3}";
769 
770  HCU_setcookie_env($HB_ENV['SYSENV'], $pwdchgCookieName, $cookievalue, 0);
771 
772  $set_form_qid_resp = hcu_encrypturl($set_form_qid_resp, $random_nbr . $HB_ENV['2factorkey']);
773  }
774 
775  if ($set_form_sac_resp != "") {
776  $random_nbr = rand(1000, 9999);
777 
778  $cookieexpires = time() + (60 * 15); // * FIFTEEN MINUTE WINDOW TO POST
779  $p3 = MD5($HB_ENV['secret'] . MD5(join(':', array($random_nbr, $cookieexpires))));
780  $cookievalue = "p1={$random_nbr}&p2={$cookieexpires}&p3={$p3}";
781 
782  HCU_setcookie_env($HB_ENV['SYSENV'], $pwdchgCookieName, $cookievalue, 0);
783 
784  $set_form_sac_resp = hcu_encrypturl($set_form_sac_resp, $random_nbr . $HB_ENV['2factorkey']);
785  }
786  ?>
787  <div class="k-content col-xs-12 col-md-8 col-md-offset-2 col-lg-g hcu-template" id='login-entry'>
788  <div id="formLoginStatus" class="homecu-formStatus k-block k-error-colored" style='display:none;'></div>
789  <?php echo $progressBar; ?>
790 
791  <form id='frmLogin' method="post" class="" action="<?php echo $HB_ENV['loginpath'] . "/" . $HB_ENV['currentscript'] . "?" . $HB_ENV['cuquery']; ?>" role="form">
792  <input type='hidden' name="cu" value="<?php echo $HB_ENV['HCUPOST']['cu']; ?>"/>
793  <input type='hidden' name="username" value="<?php echo $HB_ENV['username']; ?>"/>
794  <input type='hidden' name="email" value="<?php echo HCU_array_key_value('email', $HB_ENV['HCUPOST']); ?>"/>
795  <input type='hidden' name="chksecure" value="<?php echo HCU_array_key_exists('chksecure', $HB_ENV['HCUPOST']) ? $HB_ENV['HCUPOST']['chksecure'] : ''; ?>"/>
796  <input type='hidden' name="respqid" value="<?php echo $set_form_qid_resp; ?>"/>
797  <input type='hidden' name="respsac" value="<?php echo $set_form_sac_resp; ?>"/>
798 
799  <div id='main-login-well' class="well well-sm ">
800  <div class="form-horizontal form-widgets">
801  <?php echo $hbLoginTitle; ?>
802  <div class="form-group ">
803  <div class="col-xs-12" >
804  <div class="k-block hcu-login-block">
805  <div class="hcu-summary-block">
806  <div class="summary-desc">
807  <div class="form-group">
808  <label class="col-xs-12 "><?php echo $hbLoginText ?></label>
809  <div class="col-xs-12" >
810  <p class=""><?php echo $HB_ENV['username']; ?></p>
811  </div>
812  </div>
813  <?php if (HCU_array_key_value('confidence', $HB_ENV) != ''): ?>
814  <div class="form-group">
815  <label class="col-xs-12"><?php echo $MC->msg('Secret Word', HCU_DISPLAY_AS_HTML) ?></label>
816  <div class="col-xs-12" >
817  <p class=""><?php echo $HB_ENV['confidence']; ?></p>
818  </div>
819  </div>
820  <?php endif; ?>
821  </div>
822  </div>
823  </div>
824  </div>
825  </div>
826  <div class="form-group">
827  <label class="col-xs-12 " for="password"><?php echo $MC->msg("Login Enter Password", HCU_DISPLAY_AS_HTML); ?></label>
828  <div class="col-xs-12 col-sm-6">
829  <input type="password" class='k-textbox hcu-all-100' data-placeholder="<?php echo $MC->msg('Password', HCU_DISPLAY_AS_HTML); ?>" id="password"
830  name="password" required
831  data-required-msg='<?php echo $MC->msg('Home Banking Password', HCU_DISPLAY_AS_HTML) . ' ' . $MC->msg('is a Required Field', HCU_DISPLAY_AS_HTML); ?>'
832  autocomplete="off"
833  />
834  </div>
835  </div>
836  <?php if ($HB_ENV['flagset'] & $CU_MEMRESET){ ?>
837  <div class="form-group hcuSpacer">
838  <div class="col-xs-12">
839  <a href="<?php echo $HB_ENV['loginpath'] . '/hcuResetPwd.prg?' . $HB_ENV['cuquery']; ?>" class="hcu-link btn-block hcu-xs-btn-pad">
840  <?php print $MC->msg('Forgot your password', HCU_DISPLAY_AS_HTML); ?>
841  </a>
842  </div>
843  </div>
844  <?php } ?>
845  </div>
846  </div>
847  <div class="hcu-edit-buttons k-state-default">
848  <a href="##" id="btnStartOver" name="btnStartOver"><?php print $MC->msg('Start Over', HCU_DISPLAY_AS_HTML); ?></a>
849  &emsp;
850  <button href="##" id="btnLogin" name="btnLogin" class="k-button k-primary" type="submit" value="Log In">
851  <i class="fa fa-lock fa-lg"></i><?php echo $MC->msg("Continue", HCU_DISPLAY_AS_HTML); ?>
852  </button>
853  </div>
854  </form>
855  </div>
856 
857  <?php
858  break;
859  endswitch; ?>
860 
861  <?php /** END OF DIFFERENT LOGIN SCREENS * */ ?>
862  <?php if ($hasPromo) : ?>
863  <div class="col-xs-12 col-md-4 col-md-offset-2 col-lg-offset-0" id='login-promo'>
864  <div class="k-content">
865  <div class="">
866  <?php echo $truePromo; ?>
867  </div>
868  </div>
869  </div>
870  <?php endif; ?>
871 
872  <?php if ($loginNoticeAry['status']['code'] === '000' && count($loginNoticeAry['notice']) > 0): ?>
873  <?php /* LOGIN NOTICEFOOTER PROMO */?>
874  <div class=" " id='login-footer' style="">
875  <div class="">
876  <?php print $loginNoticeAry['notice'][0]['notice_text'];?>
877  </div>
878  </div>
879  <?php endif; ?>
880  </div><!-- row -->
881 </div><!-- container -->
882 
883 <script type="text/javascript">
884  $(document).ready(function () {
885 
886  var kendoWindow = $("<div />").kendoWindow({
887  title: "Confirm",
888  resizable: false,
889  modal: true,
890  draggable: false,
891  actions: []
892  });
893 
894  $('form:not(.filter) :input:visible:first').focus();
895 
896  $.homecuValidator.setup({formValidate: 'frmLogin', formStatusField: 'formStatus', validateOnClick: 'btnLogin'});
897 
898 
899  <?php if (intval($loginstatus_ary['status']) >= 100): ?>
900  $.homecuValidator.settings.formErrorTitle = '<?php echo $MC->msg('Error Occurred', HCU_DISPLAY_AS_JS); ?>';
901  $.homecuValidator.displayMessage(<?php echo json_encode($loginstatus_ary['dispmsg']); ?>, $.homecuValidator.settings.statusError);
902  <?php endif; ?>
903  $.homecuValidator.settings.formErrorTitle = '<?php echo $MC->msg('Error Occurred', HCU_DISPLAY_AS_JS); ?>';
904 
905 
906  $('#btnLogin').on('click', function () {
907  if ($.homecuValidator.homecuValidate) {
908  ShowWaitWindow();
909  }
910  });
911  $('#btnStartOver').click(function () {
912  window.location = '<?php echo $HB_ENV['loginpath'] . "/" . $HB_ENV['currentscript'] . "?" . $HB_ENV['cuquery']; ?>';
913  });
914 
915  $('#frmLogin').keypress(function (e) {
916  if (e.which === 13) {
917  $('#btnLogin').trigger('click');
918  return false;
919  }
920  });
921 
922  });
923 
924  //$("#sendSACResult").hide();
925  $('#gotSAC').click(function () {
926  //$("#sendSACResult").show();
927  $("#getSAC").hide();
928  $("#pubpriv").show();
929  $("#btnLogin").show();
930  $("#enterAuth").show();
931  $("#authcode").focus();
932  });
933 
934  $('#showSAC').click(function () {
935  //$("#sendSACResult").hide();
936  $("#enterAuth").hide();
937  $("#pubpriv").hide();
938  $("#getSAC").show();
939  $("#btnLogin").hide();
940  });
941 
942  $('#sendSAC').click(function () {
943 
944  var sac_deliver = $('input[name=sac_deliver]:checked').val();
945  var username = $('input[name=username]').val();
946 
947  if (sac_deliver == undefined || sac_deliver == null) {
948  $.homecuValidator.displayMessage("<?php echo $MC->msg('Login Select SAC Destination', HCU_DISPLAY_AS_HTML); ?>", $.homecuValidator.settings.statusError);
949  return false;
950  }
951 
952  ShowWaitWindow();
953 
954  // disable the button
955  $(this).prop("disabled", "disabled");
956  // start AJAX
957  var parameters = {"action": "sendSAC",
958  "sacDeliver": sac_deliver,
959  "username": username};
960  $.ajax({
961  url: "<?php echo $HB_ENV['loginpath'] . "/" . $HB_ENV['currentscript'] . "?" . $HB_ENV['cuquery']; ?>",
962  type: "post",
963  data: parameters
964  })
965  .done(function (data, textStatus, jqXHR) {
966  // Show the result
967  if (data.result) {
968  $("#getSAC").hide();
969  $("#enterAuth").show();
970  $("#pubpriv").show();
971  $("#btnLogin").show();
972  $("#authcode").focus();
973  $("#gotSAC").show();
974  $.homecuValidator.hideMessage();
975  } else {
976  $.homecuValidator.displayMessage(data.message, $.homecuValidator.settings.statusError);
977  }
978 
979 
980  })
981  .fail(function (jqXHR, textStatus, errorThrown) {
982  $.homecuValidator.displayMessage("<?php echo $MC->msg("Error", HCU_DISPLAY_AS_HTML); ?>", $.homecuValidator.settings.statusError);
983  })
984  .always(function (jqXHR, textStatus, errorThrown) {
985  $("#sendSAC").removeProp("disabled");
986  CloseWaitWindow();
987  });
988  });
989 </script>
990 
991 <style scoped>
992 
993  #display-block {
994  width: 100%;
995  overflow: auto;
996  padding: 20px 0 20px 0;
997  }
998  #display-block input {
999  width: 100%;
1000  }
1001 
1002  #content-block {
1003  max-width: 400px;
1004  }
1005 /*
1006  #panels {
1007  text-align: center;
1008 
1009  }
1010 
1011  #panels li {
1012  margin-right: 10px;
1013  margin-bottom: 10px;
1014  list-style: none;
1015  float: left;
1016  }
1017  #panels .k-block {
1018  min-height: 70px;
1019  min-width: 200px;
1020  }
1021  #panels .k-block .k-header {
1022  margin-bottom:5px;
1023  }
1024 * */
1025  .homecu-formStatus {
1026  margin-bottom: 10px
1027  }
1028  .local-radio-options {
1029  padding: 0px 0px 10px 30px;
1030  font-weight: normal;
1031  }
1032  .local-btn-hidden {
1033  display: none;
1034  }
1035  .local-cursor-pointer {
1036  cursor: pointer;
1037  }
1038 
1039 </style>
1040 
1041 <?php
1042 /*
1043  * ** END CONTENT
1044  */
1045 
1046 // ** INCLUDE POST CONTENT SCRIPT
1047 require_once(dirname(__FILE__) . '/../includes/hcuPostContent.i');
1048 ?>
1049