6 function getStaticForm($SYSENV, $dbh, $name, $self, $Cn, $Cu)
12 dms_import_v2($parameters,
"BOTTOM", array(
"masterPassword" =>
"string",
"authretry" =>
"string",
"authact" =>
"string",
"ft" =>
"string",
"authval" =>
"string"));
13 extract($parameters[
"BOTTOM"]);
14 $authretry= isset($authretry) ? $authretry : 3;
15 $authact ==
"check" ? printMasterAccessCheck($SYSENV, $dbh, $self, $ft, $authretry, $authact, $Cn, $Cu, $masterPassword) : printMasterAccess($SYSENV, $self, $authretry, $authact);
18 printSimpleMessage(
"You do not have access to the feature you selected.");
21 printSimpleMessage(
"Digital Banking is temporarily unavailable because we are working on the system.<br>We expect to be finished in about an hour.<br><br>Please try again later.");
24 printSimpleMessage(
"Because of heavy volume Digital Banking is temporarily unavailable. <br>Please allow some time before trying again.");
27 printSimpleMessage(
"The feature you requested is available as part of HomeCU, our complete digital banking software just for credit unions. <br><br> 28 <a href='http://www.homecu.net' class='link2'>Check out our web site</a> for more information, or click a link on the left to continue.");
31 printSimpleMessage(
"The feature you requested is not needed for the HomeCU live interface.");
34 printSimpleMessage(
"The page you have requested was not found. Please use one of the links on the left.");
42 function printMasterAccess($SYSENV, $self, $authretry, $authact, $msg=
"")
45 <script type=
"text/javascript">
48 $.homecuValidator.setup({formValidate:
'form', formStatusField:
'formValidateDiv'});
49 <?php printCaptureEnter(); ?>
50 $(
"#okayBtn").click(
function() {
51 if ($.homecuValidator.validate())
52 $(
this).closest(
"#form").submit();
57 <?php
if ($msg !=
"") { ?>
58 $(
"#formValidateDiv").text(
"<?php echo $msg; ?>");
59 $(
"#formValidateDiv").show();
62 $(document).ready(
function() {
66 <div
class=
"container-fluid"><div
class=
"row-fluid">
67 <form
id=
"form" method=
"post" action=
"<?php echo $self; ?>">
68 <input type=
'hidden' name=
'authretry' value=
'<?php echo $authretry; ?>'>
69 <input type=
'hidden' name=
'authact' value=
'check'>
70 <div
id=
"formValidateDiv" class=
"homecu-formStatus k-block k-error-colored" style=
"display:none;"></div>
71 <div
class=
"well well-sm ">
72 <div
class=
"form-horizontal form-widgets">
73 <?php printHeader(
"Requested Feature requires Master Privileges.");
74 loginPrintInputLine(
"Master Password",
"",
"masterPassword", 255,
true,
true,
"password",
"Password is required.");
75 printButtons(array(array(
"primary" =>
true,
"id" =>
"okayBtn",
"text" =>
"Continue")));
83 function printMasterAccessCheck($SYSENV, $dbh, $self, $ft, $authretry, $authact, $Cn, $Cu, $masterPassword)
87 $sth = db_query(
"select trim(passwd) from cuadminusers where user_name='" . strtolower($Cu) .
"'",$dbh);
89 throw new exception(
"Query failed!", 1);
90 if (db_num_rows($sth) == 0)
91 throw new exception(
"Query has zero records!", 2);
92 list($mastpwd) = db_fetch_array($sth,0);
93 if (!password_verify($masterPassword, $mastpwd))
94 throw new exception(
"Crypt failed!", 3);
95 $authval = md5($Cn .
'HomeCU4U' . $ft);
99 $SYSENV[
"logger"]->error(
"Master Access check failed!");
100 printMasterAccess($SYSENV, $self, $authretry, $authact,
"Invalid Password");
103 <script type=
"text/javascript">
104 $(document).ready(
function() {
108 <div
class=
"container-fluid"><div
class=
"row-fluid">
109 <form
id=
"form" method=
"post" action=
"<?php echo $self; ?>" role=
"form" data-role=
"validator" novalidate=
"novalidate">
110 <input type=
'hidden' name=
'authval' value=
'<?php echo $authval; ?>'>
111 <div
class=
"well well-sm ">
112 <div
class=
"form-horizontal form-widgets">
113 <div
class=
"form-group">
114 <div
class=
"col-xs-12">Thank you!</div>
122 function printSimpleMessage($msg)
124 <div
class=
"container-fluid"><div
class=
"row-fluid">
126 <div
class=
"well well-sm ">
127 <div
class=
"form-horizontal form-widgets">
128 <div
class=
"form-group">
129 <div
class=
"col-xs-12"><?php echo $msg; ?></div>