18 require_once(dirname(__FILE__) .
'/../library/permissions.i');
21 $serviceShowInfo =
true;
22 $serviceLoadMenu =
true;
23 $serviceShowMenu =
true;
24 $serviceLiveCheck =
true;
27 require_once(dirname(__FILE__) .
'/../library/hcuService.i');
30 require_once(dirname(__FILE__) .
'/../library/hcuTransferScheduled.i');
32 $string= array(
"filter" => FILTER_SANITIZE_STRING);
35 $dms_ok = array(
"security_email"=>$string,
"btnSubmit"=>$string,
36 "security_egenl"=>$string,
"security_valid"=>$string);
38 HCU_ImportVars($HB_ENV,
'HCUPOST', $dms_ok);
45 PermCheckFeatureScreen($dbh, $HB_ENV, $MC, FEATURE_TRANSFERS,
'create');
49 $permissionInputs = array(
"feature" => FEATURE_TRANSFERS );
50 $limits = Perm_GetValidationLimits( $dbh, $HB_ENV, $permissionInputs );
52 if ( $limits ===
false ) {
56 $allowedAmount = floatval( $limits[
"amount_per_transaction"] );
65 $allowScheduled = (($HB_ENV[
'flagset2'] & $GLOBALS[
'CU2_PROCRECUR']) && PermCheckFeatureScreen($dbh, $HB_ENV, $MC, FEATURE_SCHEDULED_TRANSFERS,
'',
false));
67 $transferFrequencyList = TxIntervalList($HB_ENV[
"MC"]);
68 $transferContinueList = Array(
69 Array(
"value" =>
"continuous",
"text" => $MC->msg(
'Transfer Continue Until', HCU_DISPLAY_AS_RAW) .
' ' .$MC->msg(
'Transfer Further Notice', HCU_DISPLAY_AS_RAW)),
70 Array(
"value" =>
"continueuntil",
"text" => $MC->msg(
'Transfer Continue Until', HCU_DISPLAY_AS_RAW))
74 $permissionInputs = array(
"feature" => FEATURE_M2M_TRANSFERS );
75 $permissionM2M = Perm_AccessRights( $dbh, $HB_ENV, $permissionInputs );
81 $Transfer_List_ary = TX_list($dbh, $HB_ENV);
83 setFmsgTxCookie($HB_ENV, $Transfer_List_ary);
86 $acctFromListAry[] = Array(
"acctText" =>
'',
"acctValue" =>
'',
"acctAvail" =>
'',
'acctClass' =>
'',
'acctGroup' =>
'');
87 $acctToListAry[] = Array(
"acctText" =>
'',
"acctValue" =>
'',
"acctAvail" =>
'',
'acctClass' =>
'',
'acctGroup' =>
'');
88 $acctFromListAry = Array();
89 $acctToListAry = Array();
98 $termsLinkDisplay =
'';
100 $noticeLinkDisplay =
'';
103 $fromAccountCount = 0;
105 if (count($Transfer_List_ary[
'acctlist']) > 0) {
106 foreach ($Transfer_List_ary[
'acctlist'] as $acct_key => $acct_values) {
110 if ($acct_values[
'from'] ==
'Y' && !$acct_values[
'out_of_sync']) {
112 $historyAcct = explode(
'|', $acct_key);
113 switch ($historyAcct[0]) {
119 Array(
"desc" => $MC->msg(
'Available', HCU_DISPLAY_AS_RAW),
"value" => $acct_values[
'available']),
120 Array(
"desc" => $MC->msg(
'Balance', HCU_DISPLAY_AS_RAW),
"value" => $acct_values[
'balance'])
126 $acctFromListAry[] = Array(
"acctText" => htmlspecialchars_decode(mobile_displayhtml($acct_values[
'description']), ENT_QUOTES),
"acctValue" => mobile_displayhtml($acct_key),
"acctAvail" => $acct_values[
'available'],
127 "acctInfo" => $acctInfo,
'acctClass' => $acct_values[
'acctclass'],
'acctGroup' => $acct_values[
'item-group']);
132 if ($acct_values[
'to'] ==
'Y' && !$acct_values[
'out_of_sync']) {
134 $historyAcct = explode(
'|', $acct_key);
139 if ($acct_values[
'trust'] !=
'transfer'){
140 switch ($historyAcct[0]) {
143 Array(
"desc" => $MC->msg(
'Balance', HCU_DISPLAY_AS_RAW),
"value" => $acct_values[
'balance'])
148 Array(
"desc" => $MC->msg(
'Payoff', HCU_DISPLAY_AS_RAW),
"value" => $acct_values[
'payoff']),
149 Array(
"desc" => $MC->msg(
'Balance', HCU_DISPLAY_AS_RAW),
"value" => $acct_values[
'balance']),
150 Array(
"desc" => $MC->msg(
'Payment', HCU_DISPLAY_AS_RAW),
"value" => $acct_values[
'paymentdue'])
155 Array(
"desc" => $MC->msg(
'Payoff', HCU_DISPLAY_AS_RAW),
"value" => $acct_values[
'payoff']),
156 Array(
"desc" => $MC->msg(
'Balance', HCU_DISPLAY_AS_RAW),
"value" => $acct_values[
'balance']),
157 Array(
"desc" => $MC->msg(
'Payment', HCU_DISPLAY_AS_RAW),
"value" => $acct_values[
'paymentdue'])
162 $acctToListAry[] = Array(
"acctText" => htmlspecialchars_decode($acct_values[
'description'], ENT_QUOTES),
"acctValue" => mobile_displayhtml($acct_key),
"acctInfo" => $acctInfo,
'acctClass' => $acct_values[
'acctclass'],
'acctGroup' => $acct_values[
'item-group']);
167 if ($permissionM2M[
'access']) {
168 $acctToListAry[] = array(
"acctText" => $MC->msg(
"Transfer to another member", HCU_DISPLAY_AS_RAW),
"acctValue" =>
"M|" . $HB_ENV[
'Uid'] .
"|0",
"acctInfo" => array(),
169 "acctClass" =>
"M",
"acctGroup" =>
"6 - " . $MC->msg(
"Other Member Accounts", HCU_DISPLAY_AS_RAW));
174 $accountTypes = array(
175 array(
"type" => 10,
"display" => $MC->msg(
"ACH Checking", HCU_DISPLAY_AS_HTML) ),
176 array(
"type" => 20,
"display" => $MC->msg(
"ACH Savings", HCU_DISPLAY_AS_HTML) ));
189 WHERE cu = '{$HB_ENV['Cu']}' AND role = 'transfernotify'";
190 $em_rs = db_query($sql, $dbh);
191 list($notifyemail) = db_fetch_array($em_rs, 0);
192 db_free_result($em_rs);
200 $cuTransTypesAllowed = Get_HaveTrans($dbh, $HB_ENV);
202 if (($HB_ENV[
'Fset'] & $CU_MAILTXNS) && trim($notifyemail) ==
"") {
205 $serviceErrorMsg = $MC->msg(
'Option not set', HCU_DISPLAY_AS_HTML);
206 $serviceErrorCode =
'915';
208 require_once(dirname(__FILE__) .
'/../includes/hcuErrorPage.i');
211 } elseif ($HB_ENV[
'live'] && (($HB_ENV[
'Fset3'] & GetFlagsetValue(
'CU3_API_XAC')) && ($HB_ENV[
'Fmsg_tx'] & GetMsgTxValue(
'MSGTX_TMP_XAX_LD')) == 0)) {
213 $serviceErrorCode =
'911';
215 require_once(dirname(__FILE__) .
'/../includes/hcuErrorPage.i');
218 } elseif (count($acctFromListAry) < 1 || count($acctToListAry) <= 1) {
220 $serviceErrorMsg = $MC->msg(
"No valid accounts transfer", HCU_DISPLAY_AS_HTML);
221 $serviceErrorCode =
'915';
223 require_once(dirname(__FILE__) .
'/../includes/hcuErrorPage.i');
231 $noticesAry = Get_NoticeInfo($dbh, $HB_ENV, $MC,
"D",
"transferNotice",
true);
233 $hasNoticePopup =
false;
235 if ( $noticesAry[
"status"][
"code"] ==
"000" && HCU_array_key_exists(
'0', $noticesAry[
'notice'])) {
236 if ($noticesAry[
"notice"][0][
"notice_id"] ) {
239 $noticeOption = $noticesAry[
'notice'][0];
241 $noticeOptions = Array (
242 'docsid' => $noticeOption[
'notice_id'],
243 'docstype' => $noticeOption[
'notice_type'],
246 'expireTime' => mktime() + 86400
249 $encryptedDocDetails= HCU_PayloadEncode($HB_ENV[
'Cu'], $noticeOptions);
251 $noticeOptions[
'noticeOnly'] = 1;
253 $encryptedDocDetailsNoticeOnly= HCU_PayloadEncode($HB_ENV[
'Cu'], $noticeOptions);
257 if ($noticeOption[
'notice_popup'] > 0) {
258 $hasNoticePopup =
true;
259 $noticeURL = $HB_ENV[
'homebankingpath'] .
'/hcuViewNotice.prg?cu=' . $HB_ENV[
'cu'] .
'&x=' . urlencode($encryptedDocDetails);
262 $noticeURLNoticeOnly = $HB_ENV[
'homebankingpath'] .
'/hcuViewNotice.prg?cu=' . $HB_ENV[
'cu'] .
'&x=' . urlencode($encryptedDocDetailsNoticeOnly);
269 $noticesAry = Get_NoticeInfo($dbh, $HB_ENV, $MC,
"D",
"rptTransferTerms",
true);
272 $hasTermsPopup =
false;
274 if ( $noticesAry[
"status"][
"code"] ==
"000" && HCU_array_key_exists(
'0', $noticesAry[
'notice'])) {
275 if ($noticesAry[
"notice"][0][
"notice_id"] ) {
277 $noticeOption = $noticesAry[
'notice'][0];
279 $noticeOptions = Array (
280 'docsid' => $noticeOption[
'notice_id'],
281 'docstype' => $noticeOption[
'notice_type'],
284 'expireTime' => mktime() + 86400
287 $encryptedDocDetails= HCU_PayloadEncode($HB_ENV[
'Cu'], $noticeOptions);
289 $noticeOptions[
'noticeOnly'] = 1;
291 $encryptedDocDetailsNoticeOnly= HCU_PayloadEncode($HB_ENV[
'Cu'], $noticeOptions);
295 $termsURL = $HB_ENV[
'homebankingpath'] .
'/hcuViewNotice.prg?cu=' . $HB_ENV[
'cu'] .
'&x=' . urlencode($encryptedDocDetails);
298 $termsURLNoticeOnly = $HB_ENV[
'homebankingpath'] .
'/hcuViewNotice.prg?cu=' . $HB_ENV[
'cu'] .
'&x=' . urlencode($encryptedDocDetailsNoticeOnly);
301 $hasTermsPopup = $noticeOption[
"notice_popup"] ? true :
false;
303 $termsButtonText = $noticeOption[
"notice_linkdisplay"];
308 require_once(dirname(__FILE__) .
'/../includes/hcuPreContent.i');
314 <script type=
"text/javascript">
316 $(document).ready(
function() {
317 $.homecuValidator.setup({formValidate:
"validateForm", formStatusField:
"validateStatusDiv"});
319 $(
"#validate").click(
function() {
320 $.homecuValidator.validate();
326 <div
id=
"validateForm" class=
"container-fluid">
328 <div
id=
"validateStatusDiv"></div>
331 <div
class=
"col-xs-6">This is required</div>
332 <div
class=
"col-xs-6"><input name=
'a' type=
'text' required></div>
336 <div
class=
"col-xs-6">Email check</div>
337 <div
class=
"col-xs-6"><input name=
"b" type=
'email' value=
"invalid email"></div>
341 <div
class=
"col-xs-6">Max check</div>
342 <div
class=
"col-xs-6"><input name=
"c" type=
'text' max=
"1" value=
"over max"></div>
346 <div
class=
"col-xs-6">Max Length</div>
347 <div
class=
"col-xs-6"><input name=
"d" homecu-maxlen=
"1" value=
"over max"></div>
351 <div
class=
"col-xs-6">Min Length</div>
352 <div
class=
"col-xs-6"><input name=
"e" homecu-minlen=
"10" value=
"under"></div>
356 <div
class=
"col-xs-6">Pattern Matching A</div>
357 <div
class=
"col-xs-6"><input name=
"f" homecu-match=
"integer" value=
"doesn't match"></div>
362 <div
class=
"col-xs-6">Pattern Matching B</div>
363 <div
class=
"col-xs-6"><input name=
"g" homecu-match=
"dateYY" value=
"doesn't match"></div>
367 <div
class=
"col-xs-6">Distinct Values A</div>
368 <div
class=
"col-xs-6"><input name=
"h" class=
"unique_select" homecu-distinct=
"unique_select" value=
"same"></div>
372 <div
class=
"col-xs-6">Distinct Values B</div>
373 <div
class=
"col-xs-6"><input name=
"i" class=
"unique_select" homecu-distinct=
"unique_select" value=
"same"></div>
377 <div
class=
"col-xs-6">Match Values A</div>
378 <div
class=
"col-xs-6"><input name=
"j" class=
"matchPasswords" homecu-equals=
"matchPasswords" value=
"different A"></div>
382 <div
class=
"col-xs-6">Match Values B</div>
383 <div
class=
"col-xs-6"><input name=
"k" class=
"matchPasswords" homecu-equals=
"matchPasswords" value=
"different B"></div>
387 <div
class=
"col-xs-6">Date Greater Than 01/01/2017</div>
388 <div
class=
"col-xs-6"><input name=
"l" homecu-dategtvalue=
"01/01/2017" homecu-dategttype=
"string" value=
"01/01/1500"></div>
392 <div
class=
"col-xs-6">Date Greater Than Next Control</div>
393 <div
class=
"col-xs-6"><input name=
"m" homecu-dategtvalue=
"fieldz" homecu-dategttype=
"field" value=
"01/01/1500"></div>
397 <div
class=
"col-xs-6">Set
for Next Test</div>
398 <div
class=
"col-xs-6"><input name=
"n" id=
"fieldz" value=
"01/01/2017"></div>
402 <div
class=
"col-xs-12"><a href=
"#" id=
"validate" class=
"k-button k-primary">Validate</a></div>
413 require_once(dirname(__FILE__) .
'/../includes/hcuPostContent.i');