15 $serviceShowInfo =
true;
16 $serviceLoadMenu =
true;
17 $serviceShowMenu =
false;
18 $serviceSkipSecurity =
true;
21 require_once(dirname(__FILE__) .
'/../library/hcuService.i');
25 $securePass = HCU_array_key_exists(
"securePass", $_COOKIE) ? $_COOKIE[
"securePass"] :
"";
26 $bailout =
"{$HB_ENV["loginscript
"]}?{$HB_ENV["cuquery
"]}";
31 $parts = array(
"remain" =>
"",
"until" =>
"",
"check" =>
"");
32 if ( !strlen( $securePass ) ) {
34 HCU_setcookie_env($HB_ENV[
'SYSENV'],
"securePass",
"", time() - 60);
37 parse_str( $securePass, $parts );
38 $remainTries = HCU_array_key_exists(
"remain", $parts) ? $parts[
"remain"] :
"";
39 $timeExpires = HCU_array_key_exists(
"until", $parts) ? $parts[
"until"] :
"";
40 $testValidity = md5( $remainTries . $timeExpires . $HB_ENV[
"secret"] );
44 if ( (!$remainTries) || ($timeExpires < time()) || ( $testValidity != $parts[
"check"] ) ) {
46 HCU_setcookie_env($HB_ENV[
'SYSENV'],
"securePass",
"", time() - 60);
51 $dms_ok = array(
"action" =>
"string",
"chkSecure" =>
"string",
"emailAddress" =>
"string",
"emailValid" =>
"string",
52 "profileEgenl" =>
"string",
"profileEmailAlerts" =>
"string",
"security_confidence" =>
"string",
53 "challengeQuestion" =>
"prefix_s",
"response" =>
"prefix_s",
"estatementStart" =>
"string",
54 "profilePasswordCurr" =>
"string",
"profilePasswordNew1" =>
"string",
"profilePasswordNew2" =>
"string",
55 "profileAlias1" =>
"string",
"profileAlias2" =>
"string",
"estatementNoticeId" =>
"string",
"security_phones" =>
"string" );
57 HCU_ImportVars($HB_ENV,
'HCUPOST', $dms_ok);
59 $returnScript = $HB_ENV[
"loginpath"] .
"/hcuAccounts.prg?" . $HB_ENV[
"cuquery"];
61 $action = HCU_array_key_value(
'action', $HB_ENV[
"HCUPOST"]);
63 if ( $action ==
"test_alias" ) {
64 header(
'Content-Type: application/json');
67 $userAlias = $_POST[
"alias"];
70 $aryReply = array(
"result" => FALSE,
"message" => $MC->msg(
"Error" , HCU_DISPLAY_AS_JS) );
73 if ( strlen( $userAlias ) >= 0 && strlen( $userAlias ) < 6 ) {
74 $aryReply = array(
"result" => FALSE,
"message" => $MC->msg(
'Username too short', HCU_DISPLAY_AS_JS) );
75 }
else if ( strlen( $userAlias ) > 5 && !check_alias_format( $userAlias ) ) {
77 $aryReply = array(
"result" => FALSE,
"message" => $MC->msg(
'Username appears invalid', HCU_DISPLAY_AS_JS) );
78 }
else if ( check_alias_available( $dbh, $HB_ENV, $userAlias ) ) {
79 $aryReply = array(
"result" => TRUE,
"message" => $MC->msg(
"Available", HCU_DISPLAY_AS_JS) );
81 $aryReply = array(
"result" => FALSE,
"message" => $MC->msg(
"Username not available" , HCU_DISPLAY_AS_JS) );
84 print HCU_JsonEncode($aryReply);
87 }
else if ( $action ==
"cancel_profile" ) {
90 $newTicket = SetTicket($HB_ENV, $_COOKIE[
'Ticket'], $option );
91 $_COOKIE[
'Ticket'] = $newTicket;
94 HCU_setcookie_env($HB_ENV[
'SYSENV'],
"securePass",
"", time() - 60);
96 if ( $HB_ENV[
"platform"] ==
"APP" || $HB_ENV[
"platform"] ==
"ADA" ) {
98 if ( $newTicket !=
"" ) {
99 $paramsForApps = array(
"newTicket" => urlencode( $newTicket ) );
101 $paramsJSON = HCU_JsonEncode($paramsForApps);
105 <script type=
"text/javascript">
106 var appInfo =
'<?php echo $paramsJSON; ?>';
108 <?php
if ( $HB_ENV[
"platform"] ==
"ADA" ) : ?>
109 AndroidController.notifyCommand(
"NEW_TICKET_COOKIE", appInfo);
110 <?php elseif ( $HB_ENV[
"platform"] ==
"APP" ) : ?>
113 cmd:
"NEW_TICKET_COOKIE",
117 window.webkit.messageHandlers.interOp.postMessage(postObject);
123 <form method=
"post" id=
"formCancelContinue" name=
"formCancelContinue" action=
'<?php echo $returnScript ?>'>
125 <script type=
"text/javascript">
127 document.formCancelContinue.submit();
134 header(
"Location: {$returnScript}");
141 require_once(dirname(__FILE__) .
'/../includes/hcuPreContent.i');
144 $rulesURLNoticeOnly =
"";
147 $aliasRequired = ($HB_ENV[
'Fset2'] & GetFlagsetValue(
"CU2_ALIAS_REQ")) == GetFlagsetValue(
"CU2_ALIAS_REQ");
150 $pwdRequired = ($HB_ENV[
'Ffchg'] ==
"Y");
152 $pwdRequirements = array();
153 $pwdConfigJSON =
"{}";
154 if ( $pwdRequired ) {
156 $specialCharacters = Get_PwdSpecialCharacters();
159 $pwdConfigAry = Get_PwdRules( $dbh, $HB_ENV );
160 $pwdConfigJSON = HCU_JsonEncode( $pwdConfigAry );
161 $hasPwdRequirements = count($pwdConfigAry) > 0;
172 if (HCU_array_key_value(
"len", $pwdConfigAry) > 0) {
173 $text = ( $pwdConfigAry[
"len"] > 1 ) ? $MC->msg(
"Characters", HCU_DISPLAY_AS_HTML) : $MC->msg(
"Character", HCU_DISPLAY_AS_HTML);
174 $pwdRequirements[] = array(
"which"=>
"len",
"text"=>
"{$pwdConfigAry["len
"]} {$text}" );
176 if (HCU_array_key_value(
"upper", $pwdConfigAry) > 0) {
177 $text = ( $pwdConfigAry[
"upper"] > 1 ) ? $MC->msg(
"UPPER letters", HCU_DISPLAY_AS_HTML) : $MC->msg(
"UPPER letter", HCU_DISPLAY_AS_HTML);
178 $pwdRequirements[] = array(
"which"=>
"upper",
"text"=>
"{$pwdConfigAry["upper
"]} {$text}" );
180 if (HCU_array_key_value(
"lower", $pwdConfigAry) > 0) {
181 $text = ( $pwdConfigAry[
"lower"] > 1 ) ? $MC->msg(
"lower letters", HCU_DISPLAY_AS_HTML) : $MC->msg(
"lower letter", HCU_DISPLAY_AS_HTML);
182 $pwdRequirements[] = array(
"which"=>
"lower",
"text"=>
"{$pwdConfigAry["lower
"]} {$text}" );
184 if (HCU_array_key_value(
"spec", $pwdConfigAry) > 0) {
185 $text = ( $pwdConfigAry[
"spec"] > 1 ) ? $MC->msg(
"Special characters", HCU_DISPLAY_AS_HTML) : $MC->msg(
"Special character", HCU_DISPLAY_AS_HTML);
186 $pwdRequirements[] = array(
"which"=>
"spec",
"text"=>
"{$pwdConfigAry["spec
"]} {$text} <span class='fa fa-question-circle-o' style='color: #333' id='specialTip'></span>" );
188 if (HCU_array_key_value(
"digit", $pwdConfigAry) > 0) {
189 $text = ( $pwdConfigAry[
"digit"] > 1 ) ? $MC->msg(
"Numbers", HCU_DISPLAY_AS_HTML) : $MC->msg(
"Number", HCU_DISPLAY_AS_HTML);
190 $pwdRequirements[] = array(
"which"=>
"digit",
"text"=>
"{$pwdConfigAry["digit
"]} {$text}" );
193 $hasPwdRequirements =
false;
194 $specialCharacters =
"";
198 $emailRequired = ($HB_ENV[
'Fmsg_tx'] & GetMsgTxValue(
'MSGTX_FORCE_EM'));
202 $aryPhones = array(
"mobile"=>array() );
203 $sql =
"SELECT phones FROM {$HB_ENV['Cu']}usercontact c LEFT JOIN {$HB_ENV['Cu']}user u ON u.contact = c.contact_id WHERE u.user_name = '{$HB_ENV['Cn']}'";
204 $sqlRs = db_query($sql, $dbh);
206 $rowPhones = db_fetch_assoc($sqlRs, 0);
207 $hasPhones = HCU_array_key_value(
"phones", $rowPhones);
209 $aryPhones = HCU_JsonDecode($hasPhones);
214 $questTest = GetChallengeQuestions(
"CURRENT", $dbh, $HB_ENV, $MC, $HB_ENV[
'Cn']);
222 $challengeRequired = ($HB_ENV[
'Ffreset'] > 0) ||
223 ((intval($HB_ENV[
'flagset3'] & GetFlagsetValue(
"CU3_MFA_AUTHCODE")) === 0) && (empty( $questTest ) || $questTest[
"mfacount"] == 0)) ||
224 ((intval($HB_ENV[
'flagset3'] & GetFlagsetValue(
"CU3_MFA_AUTHCODE")) > 0) && empty( $aryPhones[
'mobile']));
229 $errorList = array();
233 if (HCU_array_key_value(
'action', $HB_ENV[
'HCUPOST']) ==
'submit') {
235 $mbrInfo = GetUserInfo($dbh, $HB_ENV, $MC, Array(
"user_id" => $HB_ENV[
'Uid'],
"cu" => $HB_ENV[
'Cu']));
238 $paramChkSecure = $HB_ENV[
"HCUPOST"][
"chkSecure"] ==
"Y" ?
"Y" :
"N";
239 $paramEmailAddress = $HB_ENV[
"HCUPOST"][
"emailAddress"];
240 $paramEmailValid = $HB_ENV[
"HCUPOST"][
"emailValid"] ==
"true" ?
"Y" :
"N";
241 $paramProfileEgenl = $HB_ENV[
"HCUPOST"][
"profileEgenl"] ==
"true" ?
"Y" :
"N";
242 $paramEstatementStart = $HB_ENV[
"HCUPOST"][
"estatementStart"] ==
"true" ?
"Y" :
"N";
243 $paramProfileEmailAlerts = $HB_ENV[
"HCUPOST"][
"profileEmailAlerts"];
244 $paramSecurityConfidence = $HB_ENV[
"HCUPOST"][
"security_confidence"];
246 $paramChallengeQuestions = array();
247 $paramResponses = array();
248 if (intval($HB_ENV[
'flagset3'] & GetFlagsetValue(
"CU3_MFA_AUTHCODE")) === 0) {
250 for ( $i = 0; $i < $HB_ENV[
'cu_chgqst_count']; $i++ ) {
251 $paramChallengeQuestions[$HB_ENV[
"HCUPOST"][
"challengeQuestion{$i}"]] = $HB_ENV[
"HCUPOST"][
"response{$i}"];
255 $paramProfileAlias1 = $HB_ENV[
"HCUPOST"][
"profileAlias1"];
256 $paramProfileAlias2 = $HB_ENV[
"HCUPOST"][
"profileAlias2"];
257 $paramProfilePasswordCurr = $HB_ENV[
"HCUPOST"][
"profilePasswordCurr"];
258 $paramProfilePasswordNew1 = $HB_ENV[
"HCUPOST"][
"profilePasswordNew1"];
259 $paramProfilePasswordNew2 = $HB_ENV[
"HCUPOST"][
"profilePasswordNew2"];
261 $errorList = array();
264 $bolUseTransaction =
false;
267 $updFields[
'settings_password'][
'current'] = $paramProfilePasswordCurr;
268 if ( $pwdRequired ) {
270 $updFields[
'settings_password'][
'newpasswd'] = $paramProfilePasswordNew1;
271 $updFields[
'settings_password'][
'confpasswd'] = $paramProfilePasswordNew2;
272 $updFields[
'settings_password'][
'review_guidelines'] =
"Y";
275 $aryResult = Validate_PwdRules( $dbh, $HB_ENV, $updFields, $MC );
278 if ( $aryResult[
"status"][
"code"] !=
'000' ) {
279 for ( $e = 0; $e < count( $aryResult[
"status"][
"errors"] ); $e++ ) {
280 $errorList[] = array(
"id" =>
"",
"message" => $aryResult[
"status"][
"errors"][$e] );
293 if ($aliasRequired && is_numeric($mbrInfo[
"data"][
"cuusers_user_name"])) {
295 $updFields[
'settings_alias'][
'username'] = $HB_ENV[
'HCUPOST'][
'profileAlias1'];
296 $updFields[
'settings_alias'][
'username_confirm'] = $HB_ENV[
'HCUPOST'][
'profileAlias2'];
297 $bolUseTransaction =
true;
300 if ( $challengeRequired ) {
302 $updFields[
'settings_confidence'][
'confword'] = $paramSecurityConfidence;
304 if (HCU_array_key_exists(
'cuusers_userflags', $mbrInfo[
'data'])) {
308 $tmpVal = (int) HCU_array_key_value(
'cuusers_userflags', $mbrInfo[
'data']);
310 $tmpVal = ~(~$tmpVal | GetUserFlagsValue(
'MEM_FORCE_RESET'));
312 $updFields[
'settings_confidence'][
'userflags'] = $tmpVal;
315 if (intval($HB_ENV[
'flagset3'] & GetFlagsetValue(
'CU3_MFA_AUTHCODE'))) {
317 if (HCU_array_key_exists(
"security_phones", $HB_ENV[
'HCUPOST'])) {
318 $phonesJson = $HB_ENV[
'HCUPOST'][
'security_phones'];
319 $phonesJson = html_entity_decode($phonesJson);
320 $phonesAry = HCU_JsonDecode($phonesJson);
322 $mobile = HCU_array_key_value(
'mobile', $phonesAry);
324 $updFields[
'settings_phones'][
'mobile'] = $mobile ===
false ? array() : $mobile;
329 $arrayKeys = array_keys( $paramChallengeQuestions );
330 for ( $i = 0; $i < count( $arrayKeys ); $i++ ) {
331 $updFields[
'settings_questions'][] = Array(
'cqid' => $arrayKeys[$i],
'display' => $paramChallengeQuestions[$arrayKeys[$i]] );
337 if ( $emailRequired || $challengeRequired ) {
339 if ( strlen( $paramEmailAddress ) ) {
340 $updFields[
'settings_email'][
'email'] = $paramEmailAddress;
341 $updFields[
'settings_email'][
'egenl'] = $paramProfileEgenl;
343 $updFields[
'settings_email'][
'verify'] = $emailRequired;
344 $updFields[
'settings_email'][
'valid'] = $paramEmailValid;
346 $errorList[] = array(
"id" =>
"",
"message" => $MC->msg(
"EMail Missing", HCU_DISPLAY_AS_HTML ) );
353 $aryUpdate = Validate_Settings($dbh, $HB_ENV, $updFields, $MC);
355 if ($aryUpdate[
'status'][
'code'] !=
'000') {
356 for ( $i = 0; $i < count( $aryUpdate[
"status"][
"errors"] ); $i++ ) {
357 $errorList[] = array(
"id" =>
"",
"message" => $aryUpdate[
"status"][
"errors"][$i] );
365 if( !empty ( $aryUpdate[
'status'][
'failed_curr_pass'] ) ) {
368 $hashedValue = md5( $remainTries . $timeExpires . $HB_ENV[
"secret"] );
369 $profileCookie =
"remain=$remainTries&until=$timeExpires&check=$hashedValue";
370 HCU_setcookie_env($HB_ENV[
'SYSENV'],
"securePass",
"", time() - 60);
374 if ( !count( $errorList ) ) {
377 $userNeedsEstatements =
false;
378 $accountNumbers = array();
379 if ($HB_ENV[
"flagset3"] & GetFlagsetValue(
"CU3_ESTMNT_SIGNUP")) {
383 $sql =
"select accountnumber from " . $HB_ENV[
"Cu"] .
"memberacctrights where whichright = 'ES' and platform::jsonb ? 'D' and user_id = " . $HB_ENV[
"Uid"];
384 $sth = db_query($sql, $dbh);
386 $hasEsPositive =
false;
387 $hasEsNegative =
false;
388 for($i = 0; list($accountnumber) = db_fetch_row($sth, $i); $i++) {
389 $retEstmtStatus = Get_EstmtEnrollStatus($dbh, $HB_ENV, $MC, trim($accountnumber));
390 $accountNumbers[] = $accountnumber;
392 if ($retEstmtStatus[
'status'][
'code'] ==
'000') {
393 $hasEsPositive = $hasEsPositive || $retEstmtStatus[
"status"][
"estmt"] ==
"Y";
394 $hasEsNegative = $hasEsNegative || $retEstmtStatus[
"status"][
"estmt"] ==
"N";
398 $userNeedsEstatements = $hasEsNegative && !$hasEsPositive;
402 if ( $userNeedsEstatements && $paramEstatementStart ==
"Y" ) {
404 $HB_ENV[
'esProcessMode'] =
"start";
406 foreach($accountNumbers as $accountnumber) {
407 $esResults = Post_CUEStmt($dbh, $HB_ENV, $MC, trim($accountnumber));
408 if ( $esResults[
"status"][
"code"] !=
"000" ) {
409 for ( $i = 0; $i < count( $esResults[
"status"][
"errors"] ); $i++ ) {
413 $es_warnings[] = $esResults[
"status"][
"errors"][$i];
420 if ( $esResults[
"status"][
"code"] ==
"000" ) {
426 $HB_ENV[
"HCUPOST"][
"notice_type"] =
"C";
427 $HB_ENV[
"HCUPOST"][
"notice_id"] = intval( $HB_ENV[
"HCUPOST"][
"estatementNoticeId"] );
428 $HB_ENV[
"HCUPOST"][
"notice_device"] =
"M";
429 $HB_ENV[
"HCUPOST"][
"notice_response"] = array(
"answer" => 1 );
430 $HB_ENV[
"HCUPOST"][
"notice_cancel"] =
"0";
433 foreach ($accountNumbers as $accountnumber) {
434 $HB_ENV[
"HCUPOST"][
"notice_accountnumber"] = $accountnumber;
435 $retStatus_ary = Update_NoticeInfo($dbh, $HB_ENV, $MC);
438 if ( $retStatus_ary[
"status"][
"code"] !=
"000" ) {
439 for ( $i = 0; $i < count( $retStatus_ary[
"status"][
"errors"] ); $i++ ) {
440 $errorList[] = array(
"id" =>
"",
"message" => $retStatus_ary[
"status"][
"errors"][$i] );
446 if (intval($HB_ENV[
'flagset3'] & GetFlagsetValue(
'CU3_MFA_AUTHCODE'))) {
447 if (HCU_array_key_exists(
"settings_phones", $updFields)) {
451 $aryUpdate = Update_User_Security($dbh, $HB_ENV, $MC, $updFields);
452 if ($aryUpdate[
'status'][
'code'] !=
'000') {
454 for ( $e = 0; $e < count( $aryUpdate[
"status"][
"errors"] ); $e++ ) {
455 $aryErrors[] = array(
"message" => $aryUpdate[
"status"][
"errors"][$e] );
458 throw new Exception (HCU_JsonEncode($aryErrors));
465 $bolUseTransaction =
true;
466 $aryUpdate = Update_User_Settings($dbh, $HB_ENV, $MC, $updFields, $bolUseTransaction);
468 if ($aryUpdate[
'status'][
'code'] !=
'000') {
471 for ( $i = 0; $i < count( $aryUpdate[
"status"][
"errors"] ); $i++ ) {
472 $errorList[] = array(
"id" =>
"",
"message" => $aryUpdate[
"status"][
"errors"][$i] );
482 if ( $pwdRequired ) {
483 $newTicket = SetTicket($HB_ENV, $_COOKIE[
'Ticket'],
"Ffchg=N");
484 $_COOKIE[
'Ticket'] = $newTicket;
488 if ( $emailRequired ) {
492 $newTicket = SetTicket($HB_ENV, $_COOKIE[
'Ticket'],
"Ml=$paramEmailAddress&Fmsg_tx=" . ~(~(
int)$HB_ENV[
'Fmsg_tx'] | GetMsgTxValue(
"MSGTX_FORCE_EM")));
493 $_COOKIE[
'Ticket'] = $newTicket;
498 if ( $mbrInfo[
"data"][
"cuusers_user_name"] != $paramProfileAlias1 && $paramProfileAlias1 !=
'') {
499 $newTicket = SetTicket($HB_ENV, $_COOKIE[
'Ticket'],
"Cn=$paramProfileAlias1");
500 $_COOKIE[
'Ticket'] = $newTicket;
502 $HB_ENV[
'Cn'] = $paramProfileAlias1;
505 if (($HB_ENV[
'Fset2'] & GetFlagsetValue(
"CU2_ALIAS_REQ")) == GetFlagsetValue(
"CU2_ALIAS_REQ")) {
506 $newTicket = SetTicket($HB_ENV, $_COOKIE[
'Ticket'],
"Fset2=" . ($HB_ENV[
'Fset2'] ^ GetFlagsetValue(
"CU2_ALIAS_REQ")));
507 $_COOKIE[
'Ticket'] = $newTicket;
509 if ( $challengeRequired ) {
511 $newTicket = SetTicket($HB_ENV, $_COOKIE[
'Ticket'],
"Ffreset=0");
512 $_COOKIE[
'Ticket'] = $newTicket;
515 $newDeviceCookie =
"";
517 if ( $HB_ENV[
"platform"] ==
"APP" || $HB_ENV[
"platform"] ==
"ADA" ) {
519 $usrInfo = GetUserbyName($HB_ENV[
'dbh'], $HB_ENV[
'Cu'], $HB_ENV[
'Cn']);
522 $mfaMode = (intval($HB_ENV[
'Fset3'] & GetFlagsetValue(
'CU3_MFA_AUTHCODE')));
525 $mfaDate = HCU_array_key_value(
"mfadate", $usrInfo);
528 $cookieParams = array (
"cu" => $HB_ENV[
"cu"],
529 "user_name" => $usrInfo[
"user_name"],
530 "saved_pass" => $usrInfo[
"passwd"],
531 "saved_email" => $usrInfo[
'email'],
532 "saved_confidence" => $usrInfo[
'confidence'],
533 "mfa_mode" => $mfaMode,
534 "mfa_date" => $mfaDate,
535 "persists_time" => $HB_ENV[
'SYSENV'][
'ticket'][
'persists']
539 $cookieInfo = CreateDeviceCookie( $cookieParams);
541 $newDeviceCookie = $cookieInfo[
"name"] .
"|" . $cookieInfo[
"content"] .
"|" . $cookieInfo[
"expire"];
545 $newPassword = $paramProfilePasswordNew1;
549 if ( $paramChkSecure ==
'Y' ) {
551 $mbrInfo = GetUserInfo($dbh, $HB_ENV, $MC, Array(
"user_id" => $HB_ENV[
'Uid'],
"cu" => $HB_ENV[
'Cu']));
553 if ($mbrInfo[
'status'][
'code'] ==
'000') {
555 $HB_ENV[
'cu'] = $HB_ENV[
'Cu'];
556 $HB_ENV[
'username'] = $HB_ENV[
'Cn'];
557 $HB_ENV[
'savepass'] = trim($mbrInfo[
'data'][
'cuusers_passwd']);
558 $HB_ENV[
'savemail'] = trim($mbrInfo[
'data'][
'cuusers_email']);
559 $HB_ENV[
'confidence'] = trim($mbrInfo[
'data'][
'cuusers_confidence']);
560 SetDeviceCookie($HB_ENV, $mbrInfo[
'data']);
565 if ( strlen( $paramProfileEmailAlerts ) > 0 ) {
567 $alertInfo = Get_AlertsDetailed( $dbh, $HB_ENV[
"Cu"], $HB_ENV[
"Uid"], $HB_ENV[
"Fset3"]);
568 $alertList = $alertInfo[
"data"];
570 $emailList = explode(
"|", $paramProfileEmailAlerts );
572 for ( $a = 0; $a < count( $alertList ); $a++ ) {
573 if ( $alertList[$a][
"emailtype"] ==
"E" &&
574 in_array( $alertList[$a][
"notifyto"], $emailList ) ) {
576 $sql =
"UPDATE cu_alerts 577 SET notifyto = '{$paramEmailAddress}' 578 WHERE user_id = {$HB_ENV["Uid
"]} 579 AND id = {$alertList[$a]["id"]}";
581 db_query($sql, $dbh);
594 if ( count( $errorList ) == 0 ) {
607 $needPasswordUpdate = FALSE;
608 $neededSteps = array();
610 $needsChallenge =
false;
612 $overrideTest =
false;
616 $userNeedsEstatements =
false;
618 if ( $act ==
"auth" ) {
622 $mbrInfo = GetUserInfo($dbh, $HB_ENV, $MC, Array(
"user_id" => $HB_ENV[
'Uid'],
"cu" => $HB_ENV[
'Cu']));
625 $neededSteps[] = array(
"step" => $currStep++,
627 "title" =>
"{$MC->msg('Start', HCU_DISPLAY_AS_RAW)}",
628 "visibility" =>
"progressStart" );
631 if ( $emailRequired || $challengeRequired || $overrideTest ) {
633 $neededSteps[] = array(
"step" => $currStep++,
635 "title" =>
"{$MC->msg('EMAIL', HCU_DISPLAY_AS_RAW)}",
636 "visibility" =>
"progressEmail" );
639 if ($HB_ENV[
"flagset3"] & GetFlagsetValue(
"CU3_ESTMNT_SIGNUP")) {
642 $sql =
"select accountnumber from " . $HB_ENV[
"Cu"] .
"memberacctrights where whichright = 'ES' and platform::jsonb ? 'D' and user_id = " . $HB_ENV[
"Uid"];
643 $sth = db_query($sql, $dbh);
645 $hasEsPositive =
false;
646 $hasEsNegative =
false;
647 for($i = 0; list($accountnumber) = db_fetch_row($sth, $i); $i++) {
648 $retEstmtStatus = Get_EstmtEnrollStatus($dbh, $HB_ENV, $MC, trim($accountnumber));
650 if ($retEstmtStatus[
'status'][
'code'] ==
'000') {
651 $hasEsPositive = $hasEsPositive || $retEstmtStatus[
"status"][
"estmt"] ==
"Y";
652 $hasEsNegative = $hasEsNegative || $retEstmtStatus[
"status"][
"estmt"] ==
"N";
656 $userNeedsEstatements = $hasEsNegative && !$hasEsPositive;
660 if ( $userNeedsEstatements ) {
663 $esTermsArray = Get_NoticeInfo($dbh, $HB_ENV, $MC,
'D',
"esTermsStart");
665 if ($esTermsArray[
'status'][
'code'] ==
'000' && strlen( $esTermsArray[
'notice'][0][
'notice_text'] ) > 0 ) {
667 $esTermsText = $esTermsArray[
'notice'][0][
'notice_text'];
668 $esAccept = $MC->msg(
"Yes start e-statements", HCU_DISPLAY_AS_JS );
669 $esNoticeId = $esTermsArray[
'notice'][0][
'notice_id'];
675 if ( ($aliasRequired && is_numeric( $mbrInfo[
"data"][
"cuusers_user_name"] )) || $overrideTest ) {
676 $neededSteps[] = array(
"step" => $currStep++,
678 "title" =>
"{$MC->msg('Username', HCU_DISPLAY_AS_RAW)}",
679 "visibility" =>
"progressAlias" );
682 if ( $challengeRequired || $overrideTest ) {
683 $needsChallenge =
true;
684 $neededSteps[] = array(
"step" => $currStep++,
685 "name" =>
"Challenge",
686 "title" =>
"{$MC->msg('Security Settings', HCU_DISPLAY_AS_RAW)}",
687 "visibility" =>
"progressChallenge" );
692 $neededSteps[] = array(
"step" => $currStep++,
693 "name" =>
"Password",
694 "title" =>
"{$MC->msg('Password', HCU_DISPLAY_AS_RAW)}",
695 "visibility" =>
"progressPassword" );
697 if( $pwdRequired || $overrideTest ) {
698 $needPasswordUpdate = TRUE;
701 $noticesAry = Get_NoticeInfo($dbh, $HB_ENV, $MC,
"D",
"pwdRules",
false);
704 if ( $noticesAry[
"status"][
"code"] ==
"000" && HCU_array_key_exists(
'0', $noticesAry[
"notice"]) && HCU_array_key_exists(
'notice_id', $noticesAry[
"notice"][0]) ) {
706 $noticeOption = $noticesAry[
'notice'][0];
708 $noticeOptions = Array (
709 'docsid' => $noticeOption[
'notice_id'],
710 'docstype' => $noticeOption[
'notice_type'],
713 'expireTime' => time() + 86400,
716 $encryptedRulesNoticeOnly= HCU_PayloadEncode($HB_ENV[
'Cu'], $noticeOptions);
719 $rulesURLNoticeOnly = $HB_ENV[
'homebankingpath'] .
'/hcuViewNotice.prg?cu=' . $HB_ENV[
'cu'] .
'&x=' . urlencode($encryptedRulesNoticeOnly);
724 $neededSteps[] = array(
"step" => $currStep++,
726 "title" =>
"{$MC->msg('Done', HCU_DISPLAY_AS_RAW)}",
727 "visibility" =>
"progressDone" );
731 if ( $needsChallenge ) {
733 $mbrConfidence = $mbrInfo[
"data"][
"cuusers_confidence"];
736 $aryChallengeQuestions = GetChallengeQuestions(
"DISPLAY", $dbh, $HB_ENV, $MC);
743 foreach ($aryChallengeQuestions as $chgKey => $chgValue) {
744 $chgValue[
'display'] = html_entity_decode($chgValue[
'display'], ENT_QUOTES,
'UTF-8');
745 $aryChallengeQuestions[$chgKey] = $chgValue;
747 reset($aryChallengeQuestions);
749 $currChallengeQuestions = array();
750 if (isset($paramChallengeQuestions) && count( $paramChallengeQuestions ) > 0 &&
751 count( $paramChallengeQuestions ) == $HB_ENV[
'cu_chgqst_count'] ) {
753 $list = $paramChallengeQuestions;
755 $arrayKeys = array_keys( $list );
756 for ( $i = 0; $i < count( $arrayKeys ); $i++ ) {
757 $currChallengeQuestions[] = array(
"cqid" => $arrayKeys[$i],
"response" => $list[$arrayKeys[$i]] );
761 $list = Get_MemberChallengeResponses($dbh, $HB_ENV, $HB_ENV[
'Cn']);
763 for ( $i = 0; $i < $HB_ENV[
'cu_chgqst_count']; $i++ ) {
764 $currChallengeQuestions[] = array(
"cqid" => $aryChallengeQuestions[0][
"cqid"],
"response" =>
"" );
770 $aryChallengeQuestions = array();
771 $currChallengeQuestions = array();
772 for ( $i = 0; $i < $HB_ENV[
'cu_chgqst_count']; $i++ ) {
773 $currChallengeQuestions[] = array(
"cqid" => 0,
"response" =>
"" );
777 $currEmailAlerts =
"";
780 $emailAlertList = array();
781 $alertInfo = Get_AlertsDetailed( $dbh, $HB_ENV[
"Cu"], $HB_ENV[
"Uid"], $HB_ENV[
"Fset3"], $MC);
782 $alertList = $alertInfo[
"data"];
784 for ( $i = 0; $i < count( $alertList ); $i++ ) {
785 if ( $alertList[$i][
"emailtype"] ==
"E" ) {
788 for ( $e = 0; $e < count( $emailAlertList ); $e++ ) {
789 if ( $emailAlertList[$e][
"email"] == $alertList[$i][
"notifyto"] ) {
793 if ( $emailAlertList[$e][
"type"] != $alertList[$i][
"type_name"] ) {
795 $emailAlertList[$e][
"type"] = $MC->msg(
'Multiple', HCU_DISPLAY_AS_JS);
802 $emailAlertList[] = array(
"id" => $i,
803 "type" => $alertList[$i][
"type_name"],
804 "email" => $alertList[$i][
"notifyto"],
805 "choice" => $alertList[$i][
"notifyto"] == $HB_ENV[
"Ml"] ?
"Y" :
"N" );
810 $hasAlertEmail = count( $emailAlertList ) > 0;
812 for ( $i = 0; $i < count( $emailAlertList ); $i++ ) {
813 if ( $emailAlertList[$i][
"choice"] ==
"Y" ) {
814 if ( strlen( $currEmailAlerts ) > 0 ) $currEmailAlerts .=
"|";
815 $currEmailAlerts .= $emailAlertList[$i][
"email"];
819 $hasAlertEmail =
false;
822 if (!isset($paramEmailAddress) || $paramEmailAddress ==
"" ) {
823 $currEmail = $HB_ENV[
"Ml"];
825 $currEmail = $paramEmailAddress;
829 if (isset($paramEmailAddress) && $paramProfileEgenl !=
"" ) {
830 $currEgenl = $paramProfileEgenl ==
"Y";
832 $currEgenl = $mbrInfo[
"data"][
"cuusers_egenl_flag"] ==
"Y";
836 if ( $aliasRequired && isset($paramProfileAlias1)) {
837 $currUserAlias = $paramProfileAlias1;
840 if (!isset($paramSecurityConfidence) || $paramSecurityConfidence ==
"" ) {
841 $currConfidence = $mbrConfidence;
843 $currConfidence = $paramSecurityConfidence;
846 $currCheckSecure =
"";
847 if (isset($paramChkSecure)) {
849 $currCheckSecure = $paramChkSecure;
853 <script type=
"text/javascript">
855 var hcuChallengeQuestions = <?php echo HCU_JsonEncode($aryChallengeQuestions) ?>;
857 var hcuPhonesList = <?php print HCU_JsonEncode($aryPhones); ?>;
858 var hcuPhonesData = [];
860 <?php
if (intval($HB_ENV[
'flagset3'] & GetFlagsetValue(
'CU3_MFA_AUTHCODE'))): ?>
861 if (hcuPhonesList && hcuPhonesList.mobile) {
862 for (var i = 0; i < hcuPhonesList.mobile.length; i++) {
863 var phone = hcuPhonesList.mobile[i];
864 var phoneParts = hcuPhonesList.mobile[i].split(/[-\s]/);
867 if (phoneParts.length === 3) {
868 phone +=
"(" + phoneParts[0].replace(/\D/g,
'') +
") ";
869 phone += phoneParts[1] +
"-";
870 phone += phoneParts[2];
872 phone += phoneParts[0] +
"-";
873 phone += phoneParts[1];
884 if (hcuPhonesData.length < 5) {
892 var stepsData = <?php echo HCU_JsonEncode($neededSteps) ?>;
894 <?php
if ( $hasAlertEmail ) { ?>
895 var emailAlertList = <?php echo HCU_JsonEncode( $emailAlertList ) ?>;
900 var pwdRequirements = <?php echo $pwdConfigJSON; ?>;
901 var pwdSpecial = <?php echo HCU_JsonEncode(explode(
",", $specialCharacters )); ?>;
902 $(document).ready(
function() {
904 if ( $act ==
"done" ) {
907 var viewModel = kendo.observable({
909 progressStart:
false,
910 progressEmail:
false,
911 progressChallenge:
false,
912 progressAlias:
false,
913 progressPassword:
false,
915 continueClick:
function( e ) {
918 window.location.href =
"<?php echo $returnScript; ?>";
922 kendo.bind($(
"#profile"), viewModel);
925 $(
"#progressBar").kendoProgressBar({
931 var progressSteps = $(
"#progressBar").data(
"kendoProgressBar");
933 progressSteps.progressStatus.text(
"<?php echo $MC->msg('Done', HCU_DISPLAY_AS_JS); ?>" );
935 $(
"#progressDoneMessage").css(
"visibility",
"visible");
938 if ( $HB_ENV[
"platform"] ==
"APP" || $HB_ENV[
"platform"] ==
"ADA" ) {
940 if ( $newTicket !=
"" ) {
941 $paramsForApps = array(
"newTicket" => urlencode( $newTicket ) );
943 $paramsJSON = HCU_JsonEncode($paramsForApps);
945 var appInfo =
'<?php echo $paramsJSON; ?>';
947 <?php
if ( $HB_ENV[
"platform"] ==
"ADA" ) : ?>
948 AndroidController.notifyCommand(
"NEW_TICKET_COOKIE", appInfo);
949 <?php elseif ( $HB_ENV[
"platform"] ==
"APP" ) : ?>
952 cmd:
"NEW_TICKET_COOKIE",
956 window.webkit.messageHandlers.interOp.postMessage(postObject);
961 if ( $newDeviceCookie !=
"" ) {
962 $paramsForApps = array(
"deviceKey" => $newDeviceCookie );
963 if( $newPassword !=
"" ) {
964 $paramsForApps[
"newPassword"] = $newPassword;
967 $paramsJSON = HCU_JsonEncode($paramsForApps);
970 var appInfo =
'<?php echo $paramsJSON; ?>';
972 <?php
if ( $HB_ENV[
"platform"] ==
"ADA" ) : ?>
973 AndroidController.notifyCommand(
"NEW_DEVICE_KEY", appInfo);
974 <?php elseif ( $HB_ENV[
"platform"] ==
"APP" ) : ?>
977 cmd:
"NEW_DEVICE_KEY",
981 window.webkit.messageHandlers.interOp.postMessage(postObject);
989 if ( $HB_ENV[
"platform"] ==
"APP" || $HB_ENV[
"platform"] ==
"ADA" ) {
990 $paramsForApps = array(
"script" =>
"ProfileRequire" );
991 $paramsJSON = HCU_JsonEncode($paramsForApps);
993 var appInfo =
'<?php echo $paramsJSON; ?>';
995 <?php
if ( $HB_ENV[
"platform"] ==
"ADA" ) : ?>
996 AndroidController.notifyCommand(
"PROFILE_UPDATE", appInfo);
997 <?php elseif ( $HB_ENV[
"platform"] ==
"APP" ) : ?>
1000 cmd:
"PROFILE_UPDATE",
1004 window.webkit.messageHandlers.interOp.postMessage(postObject);
1010 }
else if ( $act ==
"auth" ) {
1013 homecuTooltip.bind({
1014 confidenceTip:
"<?php echo $MC->msg("Set Config Conf Msg
", HCU_DISPLAY_AS_JS); ?>",
1015 reenterPassTip:
"<?php echo $MC->msg("Tip Re-enter Password
", HCU_DISPLAY_AS_JS); ?>",
1016 newPassTip1:
"<?php echo $MC->msg( "New password requirements
", HCU_DISPLAY_AS_JS ) . "<br />
" . $MC->msg('Case Sensitive', HCU_DISPLAY_AS_JS); ?>",
1017 newPassTip2:
"<?php echo $MC->msg("Enter NEW password again to confirm
", HCU_DISPLAY_AS_JS); ?>",
1018 phoneTip:
"<?php echo $MC->msg("TXT Enabled Tip
", HCU_DISPLAY_AS_JS); ?>",
1019 showTooltipPrivate:
"<?php echo $MC->msg('Remember Me Secure Only', HCU_DISPLAY_AS_JS); ?>" 1022 viewModel = kendo.observable({
1023 chksecure:
"<?php echo $currCheckSecure; ?>",
1024 email:
"<?php echo $currEmail; ?>",
1026 egenl: <?php echo $currEgenl ?
"true" :
"false"; ?>,
1027 emailAlerts:
"<?php echo $currEmailAlerts; ?>",
1028 estatementStart: <?php echo $userNeedsEstatements ?
"true" :
"false"; ?>,
1029 profileAlias1:
"<?php echo $currUserAlias; ?>",
1031 confidence:
"<?php echo $currConfidence; ?>",
1033 phoneSource:
new kendo.data.DataSource({
1034 data: hcuPhonesData,
1039 id: { type:
"number" },
1040 value: { type:
"string" },
1041 new: { type:
"boolean",
default:
true }
1046 { field:
"new", dir:
"asc" },
1047 { field:
"id", dir:
"desc" }
1050 phoneBind:
function() {
1051 var grid = $(
"#phoneGrid").data(
"kendoGrid");
1052 var data = grid.dataSource.data();
1054 if (data.length >= 6) {
1055 $(
".addRow").hide();
1057 $(
".addRow").show();
1062 for ( $i = 0; $i < $HB_ENV[
'cu_chgqst_count']; $i++ ) {
1063 print
"questionList{$i}: hcuChallengeQuestions,\n";
1064 print
"selectedQuestion{$i}: {$currChallengeQuestions[$i]["cqid
"]},\n";
1065 print
"response{$i}: \"{$currChallengeQuestions[$i]["response
"]}\",\n";
1068 profilePasswordCurr:
"",
1069 profilePasswordNew1:
"",
1070 profilePasswordNew2:
"",
1072 progressStart:
true,
1073 progressEmail:
false,
1074 progressChallenge:
false,
1075 progressAlias:
false,
1076 progressPassword:
false,
1077 progressDone:
false,
1078 continueClick:
function(e) {
1082 $.homecuValidator.displayMessage(
"", $.homecuValidator.settings.statusError );
1085 var currStep = progressSteps.value();
1087 $.homecuValidator.setup({
1088 formValidate:
"formProgress" + stepsData[currStep].name,
1089 formErrorTitle:
"<?php echo $MC->msg("Error Occurred
", HCU_DISPLAY_AS_JS) ?>" 1092 if ( currStep > 0 ) {
1094 if (this.progressAlias) {
1097 validateFormUsername(
true);
1098 }
else if (this.progressChallenge) {
1101 if (validateFormStepTwo()) {
1104 var security_phones = {
1105 mobile: hcuPhonesList.mobile
1108 <?php
if (intval($HB_ENV[
'flagset3'] & GetFlagsetValue(
"CU3_MFA_AUTHCODE")) > 0) { ?>
1109 security_phones.mobile = [];
1111 var grid = $(
"#phoneGrid").data(
"kendoGrid");
1112 var data = grid.dataSource.data();
1113 for (var i = 0; i < data.length; i++) {
1114 if (data[i].
id === -1) {
1117 var value = data[i].value;
1118 value = value.replace(/[\)\(]/g,
'');
1119 value = value.replace(/\s/g,
'-');
1120 security_phones.mobile.push(value);
1124 this.
set(
"phones", JSON.stringify(security_phones));
1126 progressSteps.value( currStep + 1);
1129 $(
"#content-wrapper").animate({ scrollTop: $(
"#formStatus").offset().top }, { duration: 500 } );
1131 }
else if (this.progressPassword) {
1132 var needPasswordUpdate = <?php echo HCU_JsonEncode($needPasswordUpdate); ?>;
1133 var hasPwdRequirements = <?php echo HCU_JsonEncode($hasPwdRequirements); ?>;
1135 if (needPasswordUpdate && hasPwdRequirements) {
1136 if (validateFormStepThree()) {
1137 progressSteps.value( currStep + 1);
1140 $(
"#content-wrapper").animate({ scrollTop: $(
"#formStatus").offset().top }, { duration: 500 } );
1143 if ($.homecuValidator.validate()) {
1144 progressSteps.value( currStep + 1 );
1147 $(
"#content-wrapper").animate({ scrollTop: $(
"#formStatus").offset().top }, { duration: 500 } );
1151 }
else if ( $.homecuValidator.validate() ) {
1152 progressSteps.value( currStep + 1 );
1155 $(
"#content-wrapper").animate({ scrollTop: $(
"#formStatus").offset().top }, { duration: 500 } );
1159 if ($.homecuValidator.validate()) {
1160 progressSteps.value( currStep + 1 );
1164 if (progressSteps.value() > currStep) {
1167 $(
"#backBtn").css(
"visibility",
"visible" );
1168 $(
"#backBtn").css(
"display",
"block" );
1171 backClick:
function( e ) {
1174 $.homecuValidator.displayMessage(
"", $.homecuValidator.settings.statusError );
1177 var currStep = progressSteps.value();
1178 if ( currStep > 0 ) {
1179 $.homecuValidator.setup({formValidate:
"formProgress" + stepsData[currStep].name,
1180 formErrorTitle:
"<?php echo $MC->msg("Error Occurred
", HCU_DISPLAY_AS_JS) ?>"});
1181 progressSteps.value( currStep - 1 );
1183 if ( currStep === 1 ) {
1185 width = $(window).width();
1188 $(
"#backBtn").css(
"visibility",
"hidden" );
1190 $(
"#backBtn").css(
"display",
"none" );
1195 cancel:
function( e ) {
1200 if ( $HB_ENV[
"platform"] ==
"APP" || $HB_ENV[
"platform"] ==
"ADA" ) {
1203 $newTicket = SetTicket($HB_ENV, $_COOKIE[
'Ticket'], $option );
1206 if ( $newTicket !=
"" ) {
1207 $paramsForApps = array(
"newTicket" => $newTicket );
1208 $paramsJSON = HCU_JsonEncode($paramsForApps);
1210 var appInfo =
'<?php echo $paramsJSON; ?>';
1212 <?php
if ( $HB_ENV[
"platform"] ==
"ADA" ) : ?>
1213 AndroidController.notifyCommand(
"NEW_TICKET_COOKIE", appInfo);
1214 <?php elseif ( $HB_ENV[
"platform"] ==
"APP" ) : ?>
1217 cmd:
"NEW_TICKET_COOKIE",
1221 window.webkit.messageHandlers.interOp.postMessage(postObject);
1229 document.formCancel.submit();
1233 kendo.bind($(
"#profile"), viewModel);
1237 if ( ( HCU_array_key_value(
'action', $HB_ENV[
"HCUPOST"]) ==
"submit" ) && count( $errorList ) ) {
1239 $.homecuValidator.setup({formValidate:
"formProgressStart",
1240 formErrorTitle:
"<?php echo $MC->msg("Error Occurred
", HCU_DISPLAY_AS_JS) ?>"});
1242 var error = <?php echo HCU_JsonEncode($errorList); ?>;
1243 $.homecuValidator.displayMessage(error, $.homecuValidator.settings.statusError);
1249 var submitWindow = $(
"<div />").kendoWindow({
1259 $(
"#progressBar").kendoProgressBar({
1262 max: <?php echo count( $neededSteps ) - 1; ?>,
1264 change:
function( e ) {
1265 var currStep = progressSteps.value();
1266 var stepLabel = stepsData[currStep].title;
1267 if ( currStep > 0 ) {
1268 stepLabel = stepLabel +
" (" + currStep +
"/" + <?php echo count( $neededSteps ) - 1; ?> +
")";
1270 progressSteps.progressStatus.text( stepLabel );
1271 ChangeStep( currStep );
1273 complete:
function( e ) {
1274 if ( $.homecuValidator.validate({formValidate: progressPassword}) ) {
1276 document.formProfile.submit();
1280 var progressSteps = $(
"#progressBar").data(
"kendoProgressBar");
1282 function ChangeStep( step ) {
1283 for ( var i = 0; i < stepsData.length; i++ ) {
1284 var active = ( i == step );
1285 viewModel.set(
"progress" + stepsData[i][
"name"], active );
1289 progressSteps.progressStatus.text( stepsData[0].title );
1292 if ( $hasAlertEmail ) {
1294 $(
"#updateAlertEmails").css(
"display",
"inline" );
1297 var mobile_column_data =
"";
1298 mobile_column_data +=
"<div class=\"account_cell_desc\"><strong><?php echo $MC->msg("Alert Type
", HCU_DISPLAY_AS_JS); ?>:</strong></div> <div class=\"account_cell_value\">#= type #</div>";
1300 mobile_column_data +=
"<div class=\"account_cell_desc\"><strong><?php echo $MC->msg("Alert Email Address
", HCU_DISPLAY_AS_JS); ?>:</strong></div> <div class=\"account_cell_value\">#= email #</div>";
1302 $(
'#gridAlertEmails').kendoGrid({
1303 dataSource: emailAlertList,
1313 { field:
"type", title:
"<?php echo $MC->msg("Alert Type
", HCU_DISPLAY_AS_JS); ?>", editable:
false, minScreenWidth: 768 },
1314 { field:
"email", title:
"<?php echo $MC->msg("Alert Email Address
", HCU_DISPLAY_AS_JS); ?>", editable:
false, minScreenWidth: 768 },
1315 { title:
"<?php echo $MC->msg("Alerts
", HCU_DISPLAY_AS_JS); ?>",
template: mobile_column_data
1317 { field:
"choice", title:
"<?php echo $MC->msg("Update to above email
", HCU_DISPLAY_AS_JS); ?>", width: 65,
1318 template:
"<input type='checkbox' id='email#=id#' #= choice === 'Y' ? 'checked=checked' : '' #></input>",
1322 change:
function(e) {
1325 var selectedRow = this.dataItem(this.select());
1329 $(
"#email"+selectedRow[
"id"]).prop(
"checked", !$(
"#email"+selectedRow[
"id"]).prop(
"checked"));
1330 updateEmailAlerts();
1333 dataBound:
function () {
1334 $(
"table tbody tr").hover(
1336 $(
this).toggleClass(
"k-state-hover");
1350 if ( $needPasswordUpdate ) {
1351 if ( $hasPwdRequirements ) {
1354 homecuTooltip.bind({specialTip:
"<?php echo $MC->msg("Special characters allowed
", HCU_DISPLAY_AS_JS); ?>: <?php echo implode( " ", explode( ",
", $specialCharacters ) ); ?>"});
1356 $(
"#profilePasswordNew1").keyup(
function () {
1358 var testVal = $(
"#profilePasswordNew1").val();
1359 var testLength =
false;
1360 var testUpper =
false;
1361 var testLower =
false;
1362 var testDigit =
false;
1363 var testSpeciel =
false;
1365 testLength = testVal.length >= pwdRequirements[
'len'];
1367 testUpper = RegExp(
"([A-Z].*){" + pwdRequirements[
'upper'] +
"}");
1368 testUpper = testUpper.test(testVal);
1370 testLower = RegExp(
"([a-z].*){" + pwdRequirements[
'lower'] +
"}");
1371 testLower = testLower.test(testVal);
1373 testDigit = RegExp(
"(\\d.*){" + pwdRequirements[
'digit'] +
"}");
1374 testDigit = testDigit.test(testVal);
1376 testSpecial = pwdSpecial.join(
"|");
1377 testSpecial = testSpecial.replace(/[-\/\\^$*+?.()|[\]{}]/g,
'\\$&');
1378 testSpecial = RegExp(
"([" + testSpecial +
"].*){" + pwdRequirements[
'spec'] +
"}");
1379 testSpecial = testSpecial.test(testVal);
1382 if (pwdRequirements[
"len"] > 0) {
1384 $(
"#len .fa").removeClass(
"fa-times").addClass(
"fa-check");
1385 $(
"#len").css(
"color",
"green");
1386 viewModel.progressPassword =
true;
1388 $(
"#len .fa").removeClass(
"fa-check").addClass(
"fa-times");
1389 $(
"#len").css(
"color",
"red");
1390 viewModel.progressPassword =
false;
1394 if ( pwdRequirements[
"upper"] > 0 ) {
1396 $(
"#upper .fa").removeClass(
"fa-times").addClass(
"fa-check");
1397 $(
"#upper").css(
"color",
"green");
1398 viewModel.progressPassword =
true;
1400 $(
"#upper .fa").removeClass(
"fa-check").addClass(
"fa-times");
1401 $(
"#upper").css(
"color",
"red");
1402 viewModel.progressPassword =
false;
1406 if ( pwdRequirements[
"lower"] > 0 ) {
1408 $(
"#lower .fa").removeClass(
"fa-times").addClass(
"fa-check");
1409 $(
"#lower").css(
"color",
"green");
1410 viewModel.progressPassword =
true;
1412 $(
"#lower .fa").removeClass(
"fa-check").addClass(
"fa-times");
1413 $(
"#lower").css(
"color",
"red");
1414 viewModel.progressPassword =
false;
1418 if ( pwdRequirements[
"digit"] > 0 ) {
1420 $(
"#digit .fa").removeClass(
"fa-times").addClass(
"fa-check");
1421 $(
"#digit").css(
"color",
"green");
1422 viewModel.progressPassword =
true;
1424 $(
"#digit .fa").removeClass(
"fa-check").addClass(
"fa-times");
1425 $(
"#digit").css(
"color",
"red");
1426 viewModel.progressPassword =
false;
1430 if ( pwdRequirements[
"spec"] > 0 ) {
1431 if ( testSpecial ) {
1432 $(
"#spec .fa").removeClass(
"fa-times").addClass(
"fa-check");
1433 $(
"#spec").css(
"color",
"green");
1434 viewModel.progressPassword =
true;
1436 $(
"#spec .fa").removeClass(
"fa-check").addClass(
"fa-times");
1437 $(
"#spec").css(
"color",
"red");
1438 viewModel.progressPassword =
false;
1446 function revertPassword() {
1447 $(
"#showPasswordText").val(
"" );
1448 $(
"#showPasswordText").css(
"display",
"none" );
1449 $(
"#profilePasswordNew1").css(
"display",
"inline" );
1452 $(
"#showPassword").click(
function() {
1453 $(
"#showPasswordText").val( $(
"#profilePasswordNew1").val() )
1454 $(
"#profilePasswordNew1").css(
"display",
"none" );
1455 $(
"#showPasswordText").css(
"display",
"inline" );
1456 setTimeout(revertPassword, 1000);
1462 $(
'#testAlias').click(
function() {
1463 validateFormUsername(
false);
1467 infoWindow = $(
'#publicInfo');
1468 infoWindow.kendoWindow({
1478 window.location.href =
"<?php echo $_COOKIE[$HB_ENV['loginscript']]; ?>";
1483 $(window).keydown(
function(e){
1484 if(e.keyCode == 13) {
1491 if ( $hasAlertEmail ) {
1494 var width = $(window).width();
1495 var grid = $(
"#gridAlertEmails").data(
"kendoGrid");
1498 if ($(window).width() >= 768) {
1502 $(
"#backBtn").css(
"visibility",
"hidden" );
1507 $(
"#backBtn").css(
"display",
"none" );
1511 $(window).resize(
function() {
1512 width = $(window).width();
1523 <?php
if (intval($HB_ENV[
'flagset3'] & GetFlagsetValue(
"CU3_MFA_AUTHCODE")) > 0) { ?>
1524 var phoneGrid = $(
"#phoneGrid").data(
"kendoGrid");
1525 $.each(phoneGrid.columns,
function(idx, column) {
1526 if (column.field ===
"value")
1527 column.editor = phoneEdit;
1530 $(
"#phoneGrid").on(
"click",
".removeBtn",
function() {
1531 var row = $(
this).closest(
"tr");
1532 var grid = $(
"#phoneGrid").data(
"kendoGrid");
1533 var data = grid.dataSource.data();
1535 grid.removeRow(row);
1539 $(
"#phoneGrid").on(
"click",
".addRow",
function() {
1540 var row = $(
this).closest(
"tr");
1541 var grid = $(
"#phoneGrid").data(
"kendoGrid");
1542 var data = grid.dataSource.data();
1558 $(
"#emailConfirmSection").hide();
1559 $(
"#emailAddress").change(
function(){
1560 $(
"#profileEmailValid").prop(
"checked",
true);
1561 $(
"#profileEmailValid").prop(
"disabled",
true);
1562 $(
"#emailConfirmSection").show();
1563 $(
"#emailAddressConfirm").attr(
"required",
"required");
1564 $(
"#emailAddressConfirm").attr(
"homecu-match",
"email");
1565 $(
"#emailAddressConfirm").attr(
"homecu-equals",
"email_match");
1569 function validateFormStepThree() {
1570 var formValid = $.homecuValidator.validate();
1572 var testStepThree =
false;
1573 var testVal = $(
"#profilePasswordNew1").val();
1574 var testLength = testVal.length >= pwdRequirements[
'len'];
1576 var testUpper = RegExp(
"([A-Z].*){" + pwdRequirements[
'upper'] +
"}");
1577 testUpper = testUpper.test(testVal);
1579 var testLower = RegExp(
"([a-z].*){" + pwdRequirements[
'lower'] +
"}");
1580 testLower = testLower.test(testVal);
1582 var testDigit = RegExp(
"(\\d.*){" + pwdRequirements[
'digit'] +
"}");
1583 testDigit = testDigit.test(testVal);
1585 var testSpecial = pwdSpecial.join(
"|");
1586 testSpecial = testSpecial.replace(/[-\/\\^$*+?.()|[\]{}]/g,
'\\$&');
1587 testSpecial = RegExp(
"([" + testSpecial +
"].*){" + pwdRequirements[
'spec'] +
"}");
1588 testSpecial = testSpecial.test(testVal);
1590 if (pwdRequirements[
'len'] > 0 && testLength ==
false) { testStepThree =
false; }
1591 else if (pwdRequirements[
'upper'] > 0 && testUpper ==
false) { testStepThree =
false; }
1592 else if (pwdRequirements[
'lower'] > 0 && testLower ==
false) { testStepThree =
false; }
1593 else if (pwdRequirements[
'digit'] > 0 && testDigit ==
false) { testStepThree =
false; }
1594 else if (pwdRequirements[
'spec'] > 0 && testSpecial ==
false) { testStepThree =
false; }
1595 else { testStepThree =
true; }
1597 var stepThreeError =
"<?php echo $MC->msg('New password requirements', HCU_DISPLAY_AS_HTML) ?>";
1598 var errors = $.homecuValidator.homecuKendoValidator.errors();
1602 var index = $.inArray(stepThreeError, errors);
1604 errors.splice(index, 1);
1608 if (!testStepThree) {
1609 errors.push(stepThreeError);
1610 $.homecuValidator.displayMessage(errors, $.homecuValidator.settings.statusError);
1613 return formValid && testStepThree;
1616 function validateFormStepTwo() {
1618 var valid = $.homecuValidator.validate();
1620 <?php
if (intval($HB_ENV[
'flagset3'] & GetFlagsetValue(
"CU3_MFA_AUTHCODE")) > 0) { ?>
1621 var grid = $(
"#phoneGrid").data(
"kendoGrid");
1622 var data = grid.dataSource.data();
1623 var regex =
new RegExp(/^[2-9]\d{2}-\d{3}-\d{4}$/);
1625 for (var i = 0; i < data.length; i++) {
1626 var
id = data[i].id;
1632 var phone = data[i].value;
1633 phone = phone.replace(/[_\(\)]/g,
'');
1634 phone = phone.replace(/\s/g,
'-');
1635 var phoneValid = regex.test(phone);
1638 if (phoneValid ===
false) {
1640 var message =
"<?php echo $MC->msg("Phone Invalid
", HCU_DISPLAY_AS_JS); ?>";
1641 var errors = $.homecuValidator.homecuKendoValidator.errors();
1642 var show = errors.concat(message);
1644 $.homecuValidator.displayMessage(show, $.homecuValidator.settings.statusError);
1656 function validateFormUsername(updateStep) {
1657 var userAlias = viewModel.profileAlias1;
1660 $(
"#testAlias").prop(
"disabled",
"disabled");
1661 $(
"#testAliasResult").html(
"" );
1662 $(
"#testAliasResult").css(
"display",
"inline" );
1665 var parameters = {
"action":
"test_alias",
1666 "alias": userAlias };
1668 url:
"<?php echo $HB_ENV['loginpath'] . "/
" . $HB_ENV['currentscript'] . "?
" . $HB_ENV['cuquery']; ?>",
1672 .done(
function( data, textStatus, jqXHR ) {
1681 if ($.homecuValidator.validate()) {
1682 var step = $(
"#progressBar").data(
"kendoProgressBar").value();
1683 $(
"#progressBar").data(
"kendoProgressBar").value( step+1 );
1686 message =
"<i class='fa fa-check-circle fa-2x' style='color:green;'></i>";
1687 $.homecuValidator.hideMessage();
1695 message =
"<i class='fa fa-ban fa-2x' style='color:red;'></i>";
1697 $.homecuValidator.displayMessage(data.message, $.homecuValidator.settings.statusError);
1700 $(
"#testAliasResult").html( message );
1702 .fail(
function(jqXHR, textStatus, errorThrown) {
1703 $(
"#testAliasResult").html(
"<?php echo $MC->msg( "Error
" , HCU_DISPLAY_AS_HTML); ?>" );
1704 $(
"#testAliasResult").css(
"color",
"red");
1706 .always(
function(jqXHR, textStatus, errorThrown) {
1707 $(
"#testAlias").removeProp(
"disabled");
1708 $(
"#testAliasResult").delay(5000).fadeOut(100);
1713 function phoneEdit(container, options) {
1714 var maskedTextBox = $(
"<input name=\"" + options.field +
"\">")
1715 .appendTo(container)
1716 .kendoMaskedTextBox({
1717 mask:
"(000) 000-0000",
1718 change:
function() {
1719 var value = this.value();
1720 var valueStrip = value.replace(/_/g,
'');
1721 valueStrip = valueStrip.replace(/\s/g,
'-');
1722 valueStrip = valueStrip.replace(/[\(\)]/g,
'');
1724 options.model.phone = valueStrip;
1727 .data(
"kendoMaskedTextBox");
1730 function show_help()
1732 ShowNotice(
'<?php echo $rulesURLNoticeOnly; ?>');
1736 if ( $hasAlertEmail ) {
1738 function updateEmailAlerts() {
1739 var alertEmails =
"";
1740 var total = emailAlertList.length;
1741 for ( var i = 0; i < total; i++ ) {
1743 var row = emailAlertList[i];
1746 var test = $(
"#email"+i);
1747 if ( $(
"#email"+i).prop(
'checked') ) {
1748 if ( alertEmails.length > 0 )
1749 alertEmails = alertEmails +
"|";
1750 alertEmails = alertEmails + row[
"email"];
1755 viewModel.set(
"emailAlerts", alertEmails );
1766 .k-tooltip-content { text-align: left; max-width: 300px; }
1767 #progressStart a {text-decoration: underline !important; cursor: pointer; color: blue; } 1769 display:
inline-block;
1770 vertical-align: top;
1773 background-color: #F0F0F0;
1774 padding: 5px 5px 5px 5px;
1776 box-shadow: 0 1px 2px rgba(0,0,0,0.5);
1777 border: 1px solid rgba(255,255,255,0.2);
1778 -moz-border-radius: 3px;
1779 -webkit-border-radius: 3px;
1782 .k-dropdown .k-input,.k-selectbox .k-input {
1783 white-space: normal;
1786 .pwd-fail {color:red}
1787 .pwd-pass {color: green}
1788 #profileHolder .row { 1791 .profile-margin-when-narrow {
1795 #phoneGrid .k-grid-header { 1799 #phoneGrid .removeBtn { 1803 #phoneGrid .addBtn { 1807 @media (min-width: 768px) {
1808 .profile-margin-when-narrow {
1812 .account_cell_desc {
1819 .account_cell_value {
1826 @media only screen and (max-width: 500px) {
1827 .account_cell_desc {
1832 .account_cell_value {
1838 .local-container-margin {
1844 <div
class=
"k-content container-fluid" id=
"profile">
1845 <form method=
"post" id=
"formCancel" name=
"formCancel" action=
'<?php echo $HB_ENV["loginpath"] . "/{$HB_ENV['currentscript
']}?" . $HB_ENV["cuquery"] ?>'>
1846 <input type=
'hidden' name=
'action' value=
'cancel_profile' />
1848 <form method=
'post' id=
'formProfile' name=
'formProfile' action=
'<?php echo $HB_ENV["loginpath"] . "/{$HB_ENV['currentscript
']}?" . $HB_ENV["cuquery"] ?>'>
1849 <input type=
'hidden' name=
'action' value=
'submit' />
1850 <input type=
'hidden' name=
'chkSecure' data-bind=
"value: chksecure" />
1851 <input type=
"hidden" name=
'emailAddress' data-bind=
"value: email" />
1852 <input type=
"hidden" name=
'emailValid' data-bind=
"value: emailValid" />
1853 <input type=
'hidden' name=
'profileEgenl' data-bind=
"value: egenl" />
1854 <input type=
'hidden' name=
'profileEmailAlerts' data-bind=
"value: emailAlerts" />
1855 <input type=
'hidden' name=
'estatementStart' data-bind=
"value: estatementStart" />
1856 <input type=
'hidden' name=
'estatementNoticeId' value=
'<?php echo $esNoticeId ?>' />
1857 <input type=
"hidden" name=
"security_confidence" data-bind=
"value: confidence" />
1858 <input type=
"hidden" name=
"security_phones" data-bind=
"value: phones" />
1861 for ( $i = 0; $i < $HB_ENV[
'cu_chgqst_count']; $i++ )
1864 <input type=
'hidden' name=
"challengeQuestion<?php echo $i ?>" data-bind=
"value: selectedQuestion<?php echo $i; ?>" />
1865 <input type=
"hidden" name=
"response<?php echo $i; ?>" data-bind=
"value: response<?php echo $i; ?>" />
1869 <input type=
"hidden" name=
"profileAlias1" data-bind=
"value: profileAlias1" />
1870 <input type=
"hidden" name=
"profileAlias2" data-bind=
"value: profileAlias2" />
1871 <input type=
"hidden" name=
"profilePasswordCurr" data-bind=
"value: profilePasswordCurr" />
1872 <input type=
"hidden" name=
"profilePasswordNew1" data-bind=
"value: profilePasswordNew1" />
1873 <input type=
"hidden" name=
"profilePasswordNew2" data-bind=
"value: profilePasswordNew2" />
1875 <div
id=
'publicInfo' style=
'display:none;'>
1876 <?php echo $MC->combo_msg(
'Public Computer Is', HCU_DISPLAY_AS_HTML); ?>
1879 <div
id=
"profileEdit" class=
"k-content">
1880 <div
class=
'col-xs-12'>
1881 <div
id=
"profileHolder" style=
'width:100%;' class=
"hcuSpacer">
1882 <div
id=
"progressBar" style=
'width:100%;'></div>
1886 <div
id=
'progressStart' data-bind=
"visible: progressStart">
1887 <form
id=
'formProgressStart'>
1889 <div
class=
"col-xs-12">
1890 <span style=
'font-style: italic; font-size: large;'><?php echo $MC->msg(
'Update account settings.', HCU_DISPLAY_AS_HTML); ?></span>
1895 if ($HB_ENV[
'Ffchg'] ==
'Y'): ?>
1897 <div
class=
"col-xs-12">
1898 <span style=
'font-weight:bold; color:red;'>
1899 <?php
if ($HB_ENV[
'Ffremain'] > 1): ?>
1900 <?php echo $MC->combo_msg(
"Login Expiring", HCU_DISPLAY_AS_HTML,
"#REMAIN#", $HB_ENV[
'Ffremain']); ?>
1902 <?php echo $MC->msg(
'Login Expired Profile', HCU_DISPLAY_AS_HTML); ?>
1909 if ( ($HB_ENV[
'Ffreset'] & $MEM_FORCE_RESET) > 0 ): ?>
1911 <div
class=
"col-xs-12">
1912 <span style=
'font-weight:bold; color:red;'>
1913 <?php
if ($HB_ENV[
'Ffremain'] > 1): ?>
1914 <?php echo $MC->combo_msg(
"Challenge Update", HCU_DISPLAY_AS_HTML,
"#REMAIN#", $HB_ENV[
'Ffremain']); ?>
1916 <?php echo $MC->msg(
'Challenge Expired Profile', HCU_DISPLAY_AS_HTML); ?>
1923 if ( $HB_ENV[
"platform"] !=
"APP" && $HB_ENV[
"platform"] !=
"ADA" ): ?>
1925 <div
class=
"col-xs-12">
1926 <h4
class=
"h4"><?php echo $MC->msg(
'Should We Remember This', HCU_DISPLAY_AS_HTML); ?></h4>
1928 <label
for=
"chksecureY">
1929 <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); ?>">
1930 <span><?php echo $MC->msg(
'Remember Yes', HCU_DISPLAY_AS_HTML); ?></span><br>
1931 <span
class=
"hcu-secondary"><span
class=
"hcu-secondary-text"><?php echo $MC->msg(
'Remember Yes Message', HCU_DISPLAY_AS_HTML); ?></span></span>
1935 <label
for=
"chksecureN">
1936 <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); ?>">
1937 <span><?php echo $MC->msg(
'Remember No', HCU_DISPLAY_AS_HTML); ?></span><br>
1938 <span
class=
"hcu-secondary"><span
class=
"hcu-secondary-text"><?php echo $MC->msg(
'Remember No Message', HCU_DISPLAY_AS_HTML); ?></span></span>
1944 <script language=
'javascript'>
1946 function whatpub() {
1947 infoWindow.data(
"kendoWindow").center().open();
1956 <div
id=
'progressEmail' data-bind=
"visible: progressEmail">
1957 <form
id=
"formProgressEmail" class=
'formInputx'>
1959 <div
class=
"col-xs-12 col-sm-6 local-container-margin">
1961 <label
for=
"emailAddress">
1962 <?php echo $MC->msg(
'Email Address', HCU_DISPLAY_AS_HTML); ?>:
1965 <input type=
"email" name=
'emailAddress' 1967 class=
"k-textbox hcu-all-100 email_match" 1968 placeholder=
"<?php echo $MC->msg('Email Address', HCU_DISPLAY_AS_HTML); ?>" 1969 data-bind=
"value: email" 1970 homecu-match=
"email" 1971 data-email-msg=
"<?php echo $MC->msg('Email appears invalid', HCU_DISPLAY_AS_HTML) ?>" 1972 data-homecuCustomMatch-msg=
"<?php echo $MC->msg('Email appears invalid', HCU_DISPLAY_AS_HTML) ?>" 1973 data-required-msg=
"<?php echo $MC->msg('EMail Missing', HCU_DISPLAY_AS_HTML) ?>" 1977 <div
class=
"col-xs-12 col-sm-6 local-container-margin" id=
"emailConfirmSection">
1979 <label
for=
"emailAddressConfirm">
1980 <?php echo $MC->msg(
'Confirm Email Address', HCU_DISPLAY_AS_HTML); ?>:
1983 <input type=
"email" name=
'emailAddressConfirm' 1984 id=
'emailAddressConfirm' 1985 class=
"k-textbox hcu-all-100 email_match" 1986 placeholder=
"<?php echo $MC->msg('Email Address', HCU_DISPLAY_AS_HTML); ?>" 1987 data-email-msg=
"<?php echo $MC->msg('Email appears invalid', HCU_DISPLAY_AS_HTML) ?>" 1988 data-homecuCustomMatch-msg=
"<?php echo $MC->msg('Email appears invalid', HCU_DISPLAY_AS_HTML) ?>" 1989 data-homecuCustomEquals-msg=
"<?php echo $MC->msg('Email Confirm Mismatch', HCU_DISPLAY_AS_HTML); ?>" 1990 data-required-msg=
"<?php echo $MC->msg('Please confirm email', HCU_DISPLAY_AS_HTML) ?>"/>
1996 if ( $emailRequired ) {
1999 <div
class=
"col-xs-12 checkbox">
2001 <input type=
'checkbox' 2002 name=
'profileEmailValid' 2003 id=
'profileEmailValid' 2006 data-required-msg=
"<?php echo $MC->msg("Please confirm email
", HCU_DISPLAY_AS_HTML); ?>." 2007 data-bind=
"checked: emailValid" />
2008 <?php echo $MC->msg(
'Bad Email Flag 2', HCU_DISPLAY_AS_HTML); ?>
2016 <div
class=
"col-xs-12 checkbox">
2018 <input type=
'checkbox' name=
'profileEgenl' id=
'profileEgenl' value=
'Y' data-bind=
"checked: egenl" />
2019 <?php echo $MC->msg(
'Yes Email List', HCU_DISPLAY_AS_HTML); ?>
2025 <div
id=
"updateAlertEmails" style=
"display: none;">
2026 <span style=
'text-align: center; width:100%;'><hr style=
'width:65%;' /></span>
2028 <div
class=
"col-xs-12">
2029 <i><?php echo $MC->msg(
"Alert email message.", HCU_DISPLAY_AS_HTML ); ?></i>
2030 <div
id=
"gridAlertEmails"></div>
2037 if ( $userNeedsEstatements ) {
2039 <span style=
'text-align: center; width:100%;'><hr /></span>
2041 <form
class=
'formInputx'>
2042 <label><?php echo $MC->msg(
'Start e-Statements', HCU_DISPLAY_AS_HTML); ?>:</label>
2043 <div
class=
"k-block" style=
"max-height: 150px;overflow: auto; background-color: white;">
2044 <?php echo $esTermsText; ?>
2046 <div
class=
"checkbox">
2048 <input type=
'checkbox' 2049 name=
'estatementStart' 2050 id=
'estatementStart' 2052 data-bind=
"checked: estatementStart" /> <?php echo $esAccept ?>
2064 <div
id=
'progressChallenge' data-bind=
"visible: progressChallenge">
2065 <form
id=
"formProgressChallenge" class=
'formInputx'>
2067 <div
class=
"col-xs-12">
2068 <label
for=
"security_confidence"><?php echo $MC->msg(
'Set Config Conf Label', HCU_DISPLAY_AS_HTML); ?>: <span
class=
"fa fa-question-circle-o" id=
"confidenceTip"></span></label>
2070 <div
class=
"col-xs-12">
2072 id=
"security_confidence" 2073 name=
"security_confidence" 2074 placeholder=
"<?php echo $MC->msg('Set Config Conf Label', HCU_DISPLAY_AS_HTML); ?>" 2076 data-bind=
"value: confidence" 2078 data-required-msg=
"<?php echo $MC->msg('Set Config Enter Word', HCU_DISPLAY_AS_HTML); ?>" 2079 class=
"k-textbox hcu-all-100" 2080 style=
"max-width: 400px;"/>
2085 <!--
if use mfa confidence word flag is
set,
do not show mfa questions -->
2086 <?php
if (intval($HB_ENV[
'flagset3'] & GetFlagsetValue(
"CU3_MFA_AUTHCODE")) === 0) {?>
2088 if ( $HB_ENV[
'cu_chgqst_count'] > 0 ) {
2089 echo
"<hr style='text-align:left; margin-left:0; width:100%; color:gray; height:1px;'>";
2091 echo $MC->msg(
'Set Config Challenge Label', HCU_DISPLAY_AS_HTML);
2095 for ( $i = 0; $i < $HB_ENV[
'cu_chgqst_count']; $i++ )
2100 <div
class=
"col-xs-12 col-sm-3">
2101 <label
for=
"challenge<?php echo $i; ?>"><?php echo $MC->msg(
'Set Config Question', HCU_DISPLAY_AS_HTML) .
" " . ($i+1); ?>:</label>
2103 <div
class=
"col-xs-12 col-sm-8">
2104 <select
id=
"challengeQuestion<?php echo $i ?>" 2105 name=
"challengeQuestion<?php echo $i ?>" 2106 class=
"unique_select" 2107 data-role=
"dropdownlist" 2108 data-text-field=
"display" 2109 data-value-field=
"cqid" 2110 data-bind=
"source: questionList<?php echo $i; ?>, value: selectedQuestion<?php echo $i; ?>" 2111 homecu-distinct=
"unique_select" 2112 data-homecuCustomDistinct-msg=
"<?php echo $MC->msg("Challenge questions once
", HCU_DISPLAY_AS_HTML); ?>." 2113 style=
'width:100%;'></select><span
class=
"k-invalid-msg" data-
for=
"challengeQuestion<?php echo $i ?>"></span>
2114 <div style=
"height: 5px;"></div>
2116 id=
"challenge<?php echo $i; ?>" 2117 name=
"challenge<?php echo $i; ?>" 2118 placeholder=
"<?php echo $MC->msg('Set Config Response', HCU_DISPLAY_AS_HTML); ?>" 2119 data-bind=
"value: response<?php echo $i; ?>" 2121 data-required-msg=
"<?php echo $MC->msg("Challenge answer blank
", HCU_DISPLAY_AS_HTML); ?>." 2123 style=
'width:100%;'/>
2131 <div
class=
"col-xs-12">
2132 <label
for=
"security_phone">
2133 <span><?php echo $MC->msg(
'TXT Enabled', HCU_DISPLAY_AS_HTML); ?>:</span>
2134 <span
class=
"fa fa-question-circle-o" id=
"phoneTip"></span>
2137 <div
id=
"phoneGrid" class=
"hcu-all-100" style=
"max-width: 400px;" 2139 data-row-
template=
"phoneRow" 2145 { title: 'Mobile', field: 'value' } 2148 source: phoneSource, 2149 events: { dataBound: phoneBind }" 2160 <div
id=
'progressAlias' data-bind=
"visible: progressAlias">
2161 <form
id=
"formProgressAlias" class=
'formInputx'>
2164 <div
class=
"col-xs-12">
2165 <label
for=
"profileAlias1"><?php echo $MC->msg(
'Username', HCU_DISPLAY_AS_HTML); ?>:</label>
2167 <span
class=
"hcu-secondary col-xs-12"><span
class=
"hcu-secondary-text"><?php echo $MC->combo_msg(
'Username Set',HCU_DISPLAY_AS_HTML,
'#MAYMUST#',
"must"); ?></span></span>
2168 <div
class=
"col-xs-12">
2171 name=
"profileAlias1" 2172 placeholder=
"<?php echo $MC->msg('Username', HCU_DISPLAY_AS_HTML); ?>" 2173 data-bind=
"value: profileAlias1" 2174 <?php echo ( $aliasRequired ?
"required" :
"") ?>
2175 data-required-msg=
"<?php echo $MC->msg('Username Required', HCU_DISPLAY_AS_HTML) ?>" 2177 data-homecuCustomMinLen-msg=
"<?php echo $MC->msg('Username too short', HCU_DISPLAY_AS_HTML) ?>" 2178 class=
"k-textbox must_equal_alias" 2179 style=
'width:100%; max-width:400px;'/>
2183 <div
class=
"col-xs-12 col-sm-6">
2184 <a
id=
'testAlias' class=
'k-button'><?php echo $MC->msg(
"Test Username", HCU_DISPLAY_AS_HTML); ?></a>
2186 <div
class=
"col-xs-12 col-sm-5">
2187 <span
id=
'testAliasResult'> </span>
2192 <div
class=
"col-xs-12">
2193 <label
for=
"profileAlias2"><?php echo $MC->msg(
'Confirm Username', HCU_DISPLAY_AS_HTML); ?>:</label>
2195 <span
class=
"hcu-secondary col-xs-12"><span
class=
"hcu-secondary-text"><?php echo $MC->msg(
"Username again to confirm", HCU_DISPLAY_AS_HTML); ?></span></span>
2196 <div
class=
"col-xs-12">
2199 name=
"profileAlias2" 2200 placeholder=
"<?php echo $MC->msg('Confirm Username', HCU_DISPLAY_AS_HTML); ?>" 2201 data-bind=
"value: profileAlias2" 2202 <?php echo ( $aliasRequired ?
"required" :
"") ?>
2203 data-required-msg=
"<?php echo $MC->msg('Username Required', HCU_DISPLAY_AS_HTML) ?>" 2205 data-homecuCustomMinLen-msg=
"<?php echo $MC->msg('Username too short', HCU_DISPLAY_AS_HTML) ?>" 2206 homecu-equals=
"must_equal_alias" 2207 data-homecuCustomEquals-msg=
"<?php echo $MC->msg('Username nomatch', HCU_DISPLAY_AS_HTML) ?>" 2208 class=
"k-textbox must_equal_alias" 2209 style=
'width:100%; max-width:400px;'/>
2217 <div
id=
'progressPassword' data-bind=
"visible: progressPassword">
2218 <form
id=
"formProgressPassword" class=
'formInputx'>
2221 <div
class=
"col-xs-12">
2222 <label
for=
"profilePasswordCurr"><?php echo $MC->msg(
'Re-enter Password', HCU_DISPLAY_AS_HTML); ?>: <span
class=
"fa fa-question-circle-o" id=
"reenterPassTip"></span></label>
2224 <div
class=
"col-xs-12 col-sm-6">
2225 <input type=
"password" 2226 id=
"profilePasswordCurr" 2227 name=
"profilePasswordCurr" 2228 placeholder=
"<?php echo $MC->msg('Re-enter Password', HCU_DISPLAY_AS_HTML); ?>" 2231 data-bind=
"value: profilePasswordCurr" 2232 data-required-msg=
"<?php echo $MC->msg('Invalid Authentication', HCU_DISPLAY_AS_HTML) ?>" 2234 style=
'width:100%; max-width:320px;'/>
2238 if ( $needPasswordUpdate ) {
2242 <div
class=
"col-xs-12" style=
'font-size:smaller;'>
2243 <?php echo $MC->combo_msg(
'Password Hints Doc', HCU_DISPLAY_AS_HTML,
"#link#",
"javascript:show_help();"); ?>
2251 <div
class=
"col-xs-12">
2252 <label
for=
"profilePasswordNew1"><?php echo $MC->msg(
'New Password', HCU_DISPLAY_AS_HTML); ?>: <span
class=
"fa fa-question-circle-o" id=
"newPassTip1"></span></label>
2254 <div
class=
"col-xs-12 col-sm-6">
2255 <input type=
'text' id=
'showPasswordText' class=
'k-textbox' value=
'' style=
'width: 100%; max-width:320px; display: none;' />
2256 <input type=
"password" 2257 id=
"profilePasswordNew1" 2258 name=
"profilePasswordNew1" 2259 placeholder=
"<?php echo $MC->msg('New Password', HCU_DISPLAY_AS_HTML); ?>" 2263 data-bind=
"value: profilePasswordNew1" 2265 data-required-msg=
"<?php echo $MC->msg('New password requirements', HCU_DISPLAY_AS_HTML) ?>" 2266 data-homecuCustomMinLen-msg=
"<?php echo $MC->msg('New password must be from 4 to 8 characters long', HCU_DISPLAY_AS_HTML) ?>" 2268 data-homecuCustomMaxLen-msg=
"<?php echo $MC->msg('New password must be from 4 to 8 characters long', HCU_DISPLAY_AS_HTML) ?>" 2269 class=
"k-textbox must_equal" 2270 style=
'width: 100%; max-width:320px;'/>
2272 <div
class=
"col-xs-12 col-sm-5">
2273 <button type=
'button' id=
'showPassword' class=
'k-button'><?php echo $MC->msg(
"Show", HCU_DISPLAY_AS_HTML ); ?></button>
2277 <div
class=
"col-xs-12 col-sm-6" style=
"padding:0;">
2278 <div
class=
"col-xs-12">
2279 <label
for=
"profilePasswordNew2"><?php echo $MC->msg(
'Confirm New Password', HCU_DISPLAY_AS_HTML); ?>: <span
class=
"fa fa-question-circle-o" id=
"newPassTip2"></span></label>
2281 <div
class=
"col-xs-12">
2282 <input type=
"password" 2283 id=
"profilePasswordNew2" 2284 name=
"profilePasswordNew2" 2285 placeholder=
"<?php echo $MC->msg('Confirm New Password', HCU_DISPLAY_AS_HTML); ?>" 2289 data-bind=
"value: profilePasswordNew2" 2290 data-required-msg=
"<?php echo $MC->msg('New passwords do not match', HCU_DISPLAY_AS_HTML) ?>" 2291 homecu-equals=
"must_equal" 2292 data-homecuCustomEquals-msg=
"<?php echo $MC->msg('New passwords do not match', HCU_DISPLAY_AS_HTML) ?>" 2293 class=
"k-textbox must_equal" 2294 style=
'width: 100%; max-width:320px;'/>
2297 <div
class=
"col-xs-12 col-sm-5" style=
"padding:0;">
2299 if ( $hasPwdRequirements ) {
2301 <div
class=
"profile-margin-when-narrow">
2302 <div
class=
"col-xs-12">
2303 <label
for=
"passRequirements"><?php echo $MC->msg(
"Password Requirements", HCU_DISPLAY_AS_HTML); ?>:</label>
2305 <div
class=
"col-xs-12">
2306 <div
id=
"passRequirements" style=
"width: 200px;">
2308 for ( $i = 0; $i < count( $pwdRequirements ); $i++ ) {
2310 <span id='{$pwdRequirements[$i]["which
"]}' style='color: red;'> 2311 <span class='fa fa-times'></span> 2312 <span>{$pwdRequirements[$i]["text
"]}</span> 2333 <div
id=
'progressDone' data-bind=
"visible: progressDone">
2334 <div
id=
'progressDoneMessage'>
2335 <p style=
'margin: 20px;'>
2338 if ( $act ==
"done" ) {
2339 print $MC->msg(
'Update Completed', HCU_DISPLAY_AS_HTML)
2340 . warningMessages($es_warnings);
2352 <div
class=
"homecuForm hcu-template">
2353 <div
class=
"hcu-edit-buttons k-state-default">
2354 <?php
if ( $act ==
"auth" ) { ?>
2355 <span
class=
"hcu-icon-delete" style=
"visibility: hidden;">
2356 <a href=
"##" id=
"backBtn" data-bind=
"events:{ click: backClick }">
2357 <?php echo $MC->msg(
'Back', HCU_DISPLAY_AS_HTML) ?>
2360 <?php
if ( $HB_ENV[
'Ffremain'] > 1 ) { ?>
2361 <a href=
"##" id=
"lnkCancel" data-bind=
"events:{ click: cancel }">
2362 <?php echo $MC->msg(
"Cancel", HCU_DISPLAY_AS_HTML); ?>
2366 <a href=
"##" id=
"continueBtn" class=
"k-button k-primary" data-bind=
"events:{ click: continueClick }">
2367 <i
class=
"fa fa-arrow-right fa-lg"></i><?php echo $MC->msg(
"Continue", HCU_DISPLAY_AS_HTML); ?>
2371 <a href=
"##" id=
"continueBtn" class=
"k-button k-primary" data-bind=
"events:{ click: continueClick }">
2372 <i
class=
"fa fa-arrow-right fa-lg"></i><?php echo $MC->msg(
"Continue", HCU_DISPLAY_AS_HTML); ?>
2381 <script type=
"text/x-kendo-template" id=
"phoneRow">
2382 # if (id === -1) { # 2383 <tr data-uid=
"#: uid #" class=
"addRow">
2384 <td
class=
"addBtn"><span
class=
"fa fa-plus-circle"></span></td>
2388 <tr data-uid=
"#: uid #">
2389 <td
class=
"removeBtn"><span
class=
"fa fa-minus-circle"></span></td>
2400 require_once(dirname(__FILE__) .
'/../includes/hcuPostContent.i');
2403 function SetAlertEmail( $dbh, $id, $type, $newEmail ) {
2404 $sql =
"UPDATE cualert{$type} SET notifyto = '$newEmail' WHERE id = {$id}";
2405 db_query( $sql, $dbh );
2409 function warningMessages($warnings) {
2411 if (count($warnings) == 0) {
2415 $msgs =
'<ul class="hcu-warning-color" style=" max-width: 500px; 2416 padding: 20px; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px;">';
2417 foreach ($warnings as $warn) {
2418 $msgs .=
"<li>$warn</li>\n";