7 $monLibrary = dirname(__FILE__) .
"/../library";
8 $monIncludes = dirname(__FILE__) .
"/../includes";
9 require_once(
"$monLibrary/cu_top.i");
10 require_once(
"$monLibrary/ck_hticket.i");
11 require_once(
"$monIncludes/cu_remote_top.prg");
13 $dms_ok=array(
'act'=>
'string',
'btnSave'=>
'string',
'Cancel'=>
'string',
14 'frm_chg'=>
'string',
'frm_fc'=>
'string',
'frm_fr'=>
'digits',
'frm_ipr'=>
'string',
15 'frm_mode'=>
'string',
'frm_pl'=>
'string',
'frm_ll'=>
'string',
'frm_fl'=>
'string',
16 'frm_pwd1'=>
'string',
'frm_pwd2'=>
'string',
'frm_pwd_orig'=>
'string',
17 'frm_Scr_Avail'=>
'array',
'frm_Scr_Sel'=>
'array',
'frm_un'=>
'string',
18 'un'=>
'string',
'Remote_Update'=>
'array',
'msg'=>
'string',
'frm_sms' =>
'string',
19 'frm_altip' =>
'string',
'frm_email' =>
'string',
'frm_enabled' =>
'array',
20 'frm_start_hour' =>
'string',
'frm_start_min' =>
'string',
'frm_end_hour' =>
'string',
21 'frm_end_min' =>
'string',
'frm_pin1' =>
'string',
'frm_pin2' =>
'string');
26 $act = (isset($act) ? $act : 2);
32 if (!CheckPerm($link, $Hu, basename($_SERVER[
'SCRIPT_NAME']), $_SERVER[
'REMOTE_ADDR'])) {
41 $Notify_Minutes = Array(
"00",
"15",
"30",
"45");
42 $Notify_Items = Array(
"AlertSMS" =>
"Appliance SMS Alerts",
"AlertEmail" =>
"Appliance Email Alerts");
43 $Allowed_Scripts = Array(
45 "admin_msg" =>
"admin_msg",
46 "AdminProg" =>
"AdminProg",
47 "admin_survey" =>
"admin_survey",
48 "Admin_SurveyView" =>
"Admin_SurveyView",
49 "adm_reports" =>
"adm_reports",
50 "adm_ticket" =>
"adm_ticket",
51 "appReport" =>
"appReport",
52 "suAdminUser" =>
"suAdminUser",
53 "arsdump" =>
"arsdump",
54 "billing" =>
"billing",
55 "billing_edit" =>
"billing_edit",
56 "billing_runBilling" =>
"billing_runBilling",
57 "billing_qbwc" =>
"billing_qbwc",
58 "miPayReport" =>
"miPayReport",
59 "combo_reports" =>
"combo_reports",
60 "ContentMntc" =>
"ContentMntc",
61 "cuclock" =>
"cuclock",
62 "cucontactafter" =>
"cucontactafter",
63 "CU_ColorIndex" =>
"CU_ColorIndex",
64 "CU_ColorScheme" =>
"CU_ColorScheme",
65 "cudppacket" =>
"cudppacket",
66 "cuhavetrans" =>
"cuhavetrans",
67 "cuilist" =>
"cuilist",
68 "cuimage" =>
"cuimage",
69 "cuindex" =>
"cuindex",
70 "cuinfoedit" =>
"cuinfoedit",
71 "cuinfoadd" =>
"cuinfoadd",
72 "cuissuesmntc" =>
"cuissuesmntc",
73 "cuissues_data" =>
"cuissues_data",
74 "cuissues_edit" =>
"cuissues_edit",
75 "cuissues_report" =>
"cuissues_report",
78 "cuproduct_report" =>
"cuproduct_report",
79 "cuprogmntc" =>
"cuprogmntc",
80 "cuquest" =>
"cuquest",
81 "cuStatus" =>
"cuStatus",
82 "cutrans" =>
"cutrans",
83 "cutrustdetail" =>
"cutrustdetail",
86 "demo_ticket" =>
"demo_ticket",
87 "DocMaint" =>
"DocMaint",
88 "domain_email_report" =>
"domain_email_report",
89 "domainmap" =>
"domainmap",
90 "enrollms" =>
"enrollms",
92 "Fragmntc" =>
"Fragmntc",
94 "gomobile.pl" =>
"gomobile.pl",
95 "hcuTransAm" =>
"hcuTransAm",
96 "hcu_custom_mntc" =>
"hcu_custom_mntc",
97 "hcu_prod_edit" =>
"hcu_prod_edit",
98 "hcu_prod_list" =>
"hcu_prod_list",
99 "hcu_prod_save" =>
"hcu_prod_save",
100 "hcu_implist" =>
"hcu_implist",
101 "hcuusers" =>
"hcuusers",
102 "home_cu_prod" =>
"home_cu_prod",
103 "html_hist" =>
"html_hist",
104 "imp_main" =>
"imp_main",
105 "imp_menu" =>
"imp_menu",
106 "imp_cuissues" =>
"imp_cuissues",
107 "ivr_mntc" =>
"ivr_mntc",
108 "ivr_mntc_msg" =>
"ivr_mntc_msg",
109 "ivr_report" =>
"ivr_report",
110 "upgrade_svs" =>
"upgrade_svs",
111 "imp_notes" =>
"imp_notes",
112 "info_reports" =>
"info_reports",
113 "loanAppConfig" =>
"loanAppConfig",
114 "makecu" =>
"makecu",
115 "mcu_menu" =>
"mcu_menu",
116 "mem_ticket" =>
"mem_ticket",
117 "monitor_notes" =>
"monitor_notes",
118 "mUserList" =>
"mUserList",
119 "MonPass" =>
"MonPass",
120 "packetdump" =>
"packetdump",
121 "Passmntc" =>
"Passmntc",
122 "ProdImpStat" =>
"ProdImpStat",
123 "ProdImpStat.data" =>
"ProdImpStat.data",
124 "quickedit" =>
"quickedit",
125 "restart" =>
"restart",
126 "save_cuinfo" =>
"save_cuinfo",
127 "sehabla.pl" =>
"sehabla.pl",
128 "servindex" =>
"servindex",
129 "serv_menu" =>
"serv_menu",
130 "ShowColors" =>
"ShowColors",
131 "showflags" =>
"showflags",
132 "siteSetColor" =>
"siteSetColor",
133 "siteSettings" =>
"siteSettings",
134 "stmnt_reports" =>
"stmnt_reports",
135 "stmntcount.pl" =>
"stmntcount.pl",
136 "stmntfrags.pl" =>
"stmntfrags.pl",
137 "stmntstatus.pl" =>
"stmntstatus.pl",
138 "suCuUser" =>
"suCuUser",
139 "tfiles" =>
"tfiles",
140 "tlines" =>
"tlines",
142 "totalstats" =>
"totalstats",
143 "tr_hist" =>
"tr_hist",
144 "txtbanklog" =>
"txtbanklog",
145 "unlockbulk" =>
"unlockbulk",
146 "uplremove" =>
"uplremove",
147 "view_vend" =>
"view_vend" 150 if ($act ==
"1" && isset ($btnSave)) {
160 if (strlen(trim(trim($frm_un))) == 0) {
161 $err_msg .=
"<li>A username must be entered to continue.<br>";
163 $sql =
"SELECT count(user_name) as user_count 165 WHERE lower(user_name) = '" . prep_save(strtolower($frm_un), 12) .
"' ";
166 if ($db_result = db_query($sql, $link)) {
167 $db_row = db_fetch_array($db_result, 0);
168 $num_rows = $db_row[
'user_count'];
169 db_free_result($db_result);
174 if ($num_rows > 0 && $frm_mode ==
"NEW") {
175 $err_msg .=
"<li>The username you entered is already in use (case insensitive.)<br>";
176 } elseif ($num_rows > 0 && $frm_mode !=
"EDIT") {
177 $err_msg .=
"<li>An unknown error has occurred.<br>";
182 if (($frm_pwd1 !=
'' || $frm_pwd2 !=
'') && $err_msg ==
"" && $frm_mode ==
"EDIT") {
186 $sql =
"SELECT passwd 188 WHERE lower(user_name) = '" . prep_save(strtolower($frm_un), 12) .
"' ";
189 $pwd_rs = db_query($sql, $link);
190 list($user_pwd) = db_fetch_array($pwd_rs);
191 $user_pwd = preg_replace(
"/ +$/",
"", $user_pwd);
193 if (!password_verify($frm_pwd_orig, $user_pwd)) {
194 $err_msg .=
"<li>The old password is not correct.<br>";
196 db_free_result($pwd_rs);
199 if (($frm_pwd1 !=
"" || $frm_pwd2 !=
"") || $frm_mode ==
"NEW") {
200 if ($frm_pwd1 != $frm_pwd2) {
201 $err_msg .=
"<li>The passwords do not match.<br>";
203 if (preg_match(
"/['\"]/",$frm_pwd1)){
204 $err_msg .=
"<li>There are invalid characters in the new password.<br>";
206 if (strlen($frm_pwd1) < 4) {
207 $err_msg .=
"<li>The new password must be from 4 to 8 characters long.<br>";
209 if (strlen($frm_pwd1) > 0 && !(preg_match(
"/\d/",$frm_pwd1) && preg_match(
"/\D/",$frm_pwd1))) {
210 $err_msg .=
"<li>Password must contain both number and letter characters.<br>";
214 if (trim($frm_email) !=
'') {
215 if (!validateEmail($frm_email)) {
216 $err_msg .=
"<li>The notify email entered does not appear to be a valid email.<br>";
223 $AlertSMSEnabled =
false;
224 if (is_array($frm_enabled)) {
225 foreach($frm_enabled as $listKey) {
226 if (array_key_exists($listKey, $Notify_Items) ===
false) {
227 $err_msg .=
"<li>The Enabled Notification '$listKey' was not found.</li></br>";
231 if ($err_msg ==
'' && array_search(
'AlertSMS', $frm_enabled) !==
false) {
232 $AlertSMSEnabled =
true;
235 if ($frm_sms ==
'') {
236 $err_msg .=
"<li>To Enable Notifications you MUST have a notify SMS set.</li><br/>";
241 $notify_start = $frm_start_hour . $frm_start_min;
242 $notify_end = $frm_end_hour . $frm_end_min;
243 if ($AlertSMSEnabled) {
245 if ($notify_end <= $notify_start) {
246 $err_msg .=
"<li>The Ending Notify Hours must be greater than Start.</li><br/>";
248 if ($notify_end >
'2400') {
249 $err_msg .=
"<li>The Ending Notify Hours must NOT be greater than 2400.</li><br/>";
253 if ($frm_pin1 !=
'' || $frm_pin2 !=
'') {
254 if ($frm_pin1 != $frm_pin2) {
255 $err_msg .=
"<li>The New PIN fields were NOT confirmed.</li><br/>";
256 } elseif (strlen($frm_pin1) < 4 || strlen($frm_pin1) > 8) {
257 $err_msg .=
"<li>The New PIN must be between 4 and 8 characters long.</li><br/>";
266 if (count($frm_Scr_Sel) > 0) {
267 foreach ($frm_Scr_Sel as $value) {
268 if ($value == $Allowed_Scripts[
'*']) {
274 $save_allow .= prep_save($value) .
"\n";
279 if ($save_allow > 2000) {
281 $err_msg =
"<li>The Allowed scripts has reached its internal maximum. Fewer scripts will need to be selected.<br>\n";
285 if (($frm_fr != intval($frm_fr)) && strlen($frm_fr) > 0) {
286 $err_msg .=
"<li>The failed remaining must be a numeric value.<br>";
289 if ($err_msg ==
"") {
293 $save_pwd = password_hash(trim($frm_pwd1), PASSWORD_DEFAULT);
294 $save_ipr = prep_save($frm_ipr, 1000);
295 $save_altip = prep_save($frm_altip, 15);
296 $save_fc = prep_save($frm_fc, 1);
297 $save_fr = intval($frm_fr);
298 $save_chg = intval($frm_chg);
299 $save_sms = prep_save($frm_sms, 40);
300 $save_email = prep_save($_POST[
'frm_email'], 100);
305 $save_pin = ($frm_pin1 ==
'' ?
'' : crypt(trim($frm_pin1)));
306 if (is_array($frm_enabled)) {
309 $save_enabled = prep_save(implode(
" ", $frm_enabled), 100);
311 $save_notifyhours = prep_save($notify_start .
":". $notify_end);
315 $sql_upd =
"UPDATE dmsmonitorusers 317 if (strlen($frm_pin1) > 0) {
318 $sql_upd .=
"notifypin = '$save_pin', ";
321 if (strlen($frm_pwd1) > 0) {
322 $sql_upd .=
"passwd = '$save_pwd', ";
325 ip_range = '$save_ipr', 326 altipaddress = '$save_altip', 327 allowed_scripts = '$save_allow', 328 usersms = '$save_sms', 329 notifyemail = '$save_email', 330 failedremain = '$save_fr', 331 forcechange = '$save_fc', 332 forceremain = '$save_chg', 333 notifyhours = '$save_notifyhours', 334 notifyenabled = '$save_enabled' 336 WHERE lower(user_name) = '" . prep_save(strtolower($frm_un), 12) .
"' ; ";
339 passwd = '$save_pwd', 340 usersms = '$save_sms', 341 notifyemail = '$save_email', 342 notifyhours = '$save_notifyhours', 343 notifyenabled = '$save_enabled' 344 WHERE lower(user_name) = '" . prep_save(strtolower($Hu), 12) .
"' ; ";
348 header(
"Location: /hcuadm/hcu_noperm.prg");
352 $sql_ins =
"INSERT INTO dmsmonitorusers 353 (user_name, passwd, ip_range, altipaddress, usersms, 354 notifyemail, allowed_scripts, failedremain, forcechange, forceremain, notifypin, notifyhours, notifyenabled ) 356 ('" . prep_save(strtolower($frm_un), 12) .
"', '$save_pwd', '$save_ipr', '$save_altip', '$save_sms', 357 '$save_email', '$save_allow', '$save_fr', '$save_fc', '$save_chg', '$save_pin', '$save_notifyhours', '$save_enabled' ); ";
360 $sql_ask =
"SELECT * FROM dmsmonitorusers 361 WHERE lower(user_name) = '" . prep_save(strtolower($frm_un), 12) .
"' ";
362 $db_result = db_query($sql_ask, $link);
363 $cnum_rows = db_num_rows($db_result);
364 if ($cnum_rows > 0 ) {
371 if (!($db_result=db_query($sql, $link))) {
373 $err_msg =
"<br>Unable to Save HomeCU Monitor User!<br><br>";
375 $Remote_Results =
"";
376 if (Remote_Update_Selected() || (!$Full_Access)) {
379 Remote_Field_Add(
"dmsusers",
"user_name", prep_save(strtolower($frm_un), 12));
380 if (strlen($frm_pwd1) > 0) {
381 Remote_Field_Add(
"dmsusers",
"passwd", $save_pwd);
383 if (strlen($frm_pin1) > 0) {
384 Remote_Field_Add(
"dmsusers",
"notifypin", $save_pin);
387 Remote_Field_Add(
"dmsusers",
"usersms", $save_sms);
389 Remote_Field_Add(
"dmsusers",
"notifyhours", $save_notifyhours);
390 Remote_Field_Add(
"dmsusers",
"notifyenabled", $save_enabled);
391 Remote_Field_Add(
"dmsusers",
"notifyemail", $save_email);
394 Remote_Field_Add(
"dmsusers",
"ip_range", $save_ipr);
395 Remote_Field_Add(
"dmsusers",
"altipaddress", $save_altip);
396 Remote_Field_Add(
"dmsusers",
"allowed_scripts", $save_allow);
400 $Remote_Results = Remote_Update_Send(
"U",
"dmsusers");
402 $Remote_Results = Remote_Update_All(
"U",
"dmsusers");
406 header(
"Location: /hcuadm/hcuusers.prg?act=2&msg=" . urlencode(
"The HomeCU Monitor User " . strtolower($frm_un) .
" was saved successfully.<br><br>$Remote_Results"));
423 $disp_allow = array();
424 $disp_select = array();
428 $disp_enabled = array();
430 $disp_start_hour =
'';
431 $disp_start_min =
'';
436 $disp_allow = array_diff($Allowed_Scripts, $disp_allow);
437 $disp_priorlogin =
"";
438 $disp_lastlogin =
"";
439 $disp_failedlogin =
"";
445 if (isset($frm_mode)) {
446 $disp_mode = $frm_mode;
450 if (isset($btnSave)) {
454 $disp_sms = dms_disphtml($frm_sms);
455 $disp_email = dms_disphtml($_POST[
'frm_email']);
457 $disp_un = dms_disphtml($frm_un);
458 $disp_ipr = dms_disphtml($frm_ipr);
459 $disp_altip = dms_disphtml($frm_altip);
462 if (count($frm_Scr_Sel) > 0) {
463 $disp_allow = array_diff($Allowed_Scripts, $frm_Scr_Sel);
464 $disp_select = array_intersect($Allowed_Scripts, $frm_Scr_Sel);
467 $disp_fr = intval($frm_fr);
468 $disp_fc = dms_disphtml(trim($frm_fc));
469 $disp_chg = intval($frm_chg);
471 $disp_priorlogin = trim($frm_pl);
472 $disp_lastlogin = trim($frm_ll);
473 $disp_failedlogin = trim($frm_fl);
477 $disp_fr = intval($frm_fr);
478 $disp_fc = dms_disphtml(trim($frm_fc));
479 $disp_chg = intval($frm_chg);
481 $disp_priorlogin = trim($frm_pl);
482 $disp_lastlogin = trim($frm_ll);
483 $disp_failedlogin = trim($frm_fl);
486 $disp_enabled = $frm_enabled;
487 $disp_start_hour = $frm_start_hour;
488 $disp_start_min = $frm_start_min;
489 $disp_end_hour = $frm_end_hour;
490 $disp_end_min = $frm_end_min;
491 } elseif (isset($un) || !$Full_Access) {
495 $disp_un = strtolower($un);
497 $disp_un = strtolower($Hu);
504 WHERE lower(user_name) = '" . trim(prep_save(strtolower($disp_un), 12)) .
"' ";
505 $load_rs = db_query($sql, $link);
506 if ($load_row = db_fetch_array($load_rs)) {
507 $disp_un = dms_disphtml($load_row[
'user_name']);
509 $disp_sms = dms_disphtml($load_row[
'usersms']);
510 $disp_email = dms_disphtml($load_row[
'notifyemail']);
512 $disp_ipr = dms_disphtml($load_row[
'ip_range']);
513 $disp_altip = dms_disphtml($load_row[
'altipaddress']);
514 $disp_fr = dms_disphtml($load_row[
'failedremain']);
515 $disp_fc = dms_disphtml($load_row[
'forcechange']);
516 $disp_chg = dms_disphtml($load_row[
'forceremain']);
518 $disp_select = explode(
"\n", $load_row[
'allowed_scripts']);
520 foreach ($disp_select as $key=>$value) {
521 $disp_select[$key] = $Allowed_Scripts[$value];
524 if (count($disp_select) > 0) {
525 if ($disp_select[0] ==
"") {
526 $disp_select = array_reverse($disp_select);
527 array_pop($disp_select);
528 $disp_select = array_reverse($disp_select);
530 if (count($disp_select) > 0) {
531 if ($disp_select[count($disp_select) - 1] ==
"") {
532 if (count($disp_select) > 0) {
533 array_pop($disp_select);
540 $disp_allow = array_diff($Allowed_Scripts, $disp_select);
544 $disp_enabled = explode(
" ", $load_row[
'notifyenabled']);
545 if (strlen(trim($load_row[
'notifyhours'])) == 9) {
547 $disp_start_hour = substr(trim($load_row[
'notifyhours']), 0, 2);
548 $disp_start_min = substr(trim($load_row[
'notifyhours']), 2, 2);
549 $disp_end_hour = substr(trim($load_row[
'notifyhours']), 5, 2);
550 $disp_end_min = substr(trim($load_row[
'notifyhours']), 7, 2);
553 $disp_priorlogin = dms_disphtml($load_row[
'priorlogin']);
554 $disp_lastlogin = dms_disphtml($load_row[
'lastlogin']);
555 $disp_failedlogin = dms_disphtml($load_row[
'failedlogin']);
561 header(
"Location: /hcuadm/hcu_noperm.prg");
568 cu_header(
"Edit HomeCU Monitor Users");
570 <form action=
"hcuusers.prg" method=
"post" name=
"hcuform">
571 <input type=
"hidden" name=
"act" value=
"<?php echo $act; ?>">
572 <input type=
"hidden" name=
"frm_mode" value=
"<?php echo $disp_mode; ?>">
575 <table cellpadding=
"3" cellspacing=
"0" border=
"0" width=
"500" class=
"dmsbg"><tr><td>
576 <table cellpadding=
"1" cellspacing=
"0" border=
"0" width=
"100%" bgcolor=white>
577 <?php
if ($err_msg !=
""): ?>
579 <td colspan=
"2" class=
"err" align=
"center">
580 The following errors will need to be fixed before saving can complete.<Br><br><?php echo $err_msg; ?>
585 <td colspan=
"2" class=
"bar" align=
"center">
586 <?php
if($disp_mode ==
"EDIT"): ?>
587 Edit HomeCU Monitor
User 589 Add HomeCU Monitor
User 593 <?php
if (isset($msg)): ?>
595 <td colspan=
"5" class=
"msg" align=
"center">
601 <td nowrap align=
"right" class=
"hdr">
604 <td nowrap
class=
'dtl'>
605 <?php
if ($disp_mode ==
"NEW"): ?>
606 <input type=
"text" name=
"frm_un" size=
"12" maxlength=
"12" value=
"<?php echo strtolower($disp_un); ?>">
608 <?php echo strtolower($disp_un); ?>
609 <input type=
"hidden" name=
"frm_un"value=
"<?php echo strtolower($disp_un); ?>">
614 <td nowrap align=
"right" class=
"hdr"> </td>
615 <td nowrap
class=
'dtl'> </td>
617 <?php
if ($disp_mode ==
"EDIT"): ?>
619 <td nowrap align=
"right" class=
"hdr">
622 <td nowrap
class=
'dtl'>
623 <input type=
"password" name=
"frm_pwd_orig" size=
"10" maxlength=
"12">
624 <span
class=
"iegreen">* Only required
for new password</span>
629 <td nowrap align=
"right" class=
"hdr">
632 <td nowrap
class=
'dtl'>
633 <input type=
"password" name=
"frm_pwd1" size=
"10" maxlength=
"12">
637 <td nowrap align=
"right" class=
"hdr">
638 Confirm New Password:
640 <td nowrap
class=
'dtl'>
641 <input type=
"password" name=
"frm_pwd2" size=
"10" maxlength=
"12">
645 <td nowrap align=
"center" class=
"hdr" colspan =
"2" style=
"font-size:1.5em">
650 <td nowrap align=
"right" class=
"hdr" valign=
"top">
653 <td nowrap
class=
'dtl' valign=
"top">
654 <input type=
"text" name=
"frm_sms" size=25 maxlength=40 value=
"<?php echo $disp_sms; ?>">
655 <span
class=
"iegreen">ie. 2085551234@vtext.com</span>
659 <td nowrap align=
"right" class=
"hdr" valign=
"top">
662 <td nowrap
class=
'dtl' valign=
"top">
663 <input type=
"text" name=
"frm_email" size=25 maxlength=70 value=
"<?php echo $disp_email; ?>">
664 <span
class=
"iegreen">ie. name@homecu.net</span>
668 <td align=
"right" class=
"hdr" valign=
"top">
671 <td
class=
'dtl' valign=
'top'>
672 <?php
foreach ($Notify_Items as $itemKey => $itemList) : ?>
673 <input type=
"checkbox" name=
"frm_enabled[]" <?php echo (is_array($disp_enabled) ? (array_search($itemKey, $disp_enabled) !==
false ?
"CHECKED" :
"") :
"" ); ?> value=
"<?php echo dms_disphtml($itemKey); ?>"><?php echo dms_disphtml($itemList); ?><br/>
678 <td align=
"right" class=
"hdr" valign=
"top">
681 <td
class=
'dtl' valign=
'top'>
682 <select name=
'frm_start_hour'>
683 <?php
for ($x=0; $x <= 24; $x++): ?>
684 <option value=
'<?php echo substr('00
' . $x, -2); ?>' <?php echo ($disp_start_hour == substr(
'00' . $x, -2) ?
"SELECTED" :
""); ?>><?php echo substr(
'00' . $x, -2); ?></option>
687 <select name=
'frm_start_min'>
688 <?php
foreach ($Notify_Minutes as $list_min): ?>
689 <option value=
'<?php echo $list_min; ?>' <?php echo ($disp_start_min == $list_min ?
"SELECTED" :
""); ?>><?php echo $list_min; ?></option>
693 <select name=
'frm_end_hour'>
694 <?php
for ($x=0; $x <= 24; $x++): ?>
695 <option value=
'<?php echo substr('00
' . $x, -2); ?>' <?php echo ($disp_end_hour == substr(
'00' . $x, -2) ?
"SELECTED" :
""); ?>><?php echo substr(
'00' . $x, -2); ?></option>
698 <select name=
'frm_end_min'>
699 <?php reset($Notify_Minutes);
foreach ($Notify_Minutes as $list_min): ?>
700 <option value=
'<?php echo $list_min; ?>' <?php echo ($disp_end_min == $list_min ?
"SELECTED" :
""); ?>><?php echo $list_min; ?></option>
706 <td nowrap align=
"right" class=
"hdr">
709 <td nowrap
class=
'dtl'>
710 <input type=
"password" name=
"frm_pin1" size=
"8" maxlength=
"6">
714 <td nowrap align=
"right" class=
"hdr">
717 <td nowrap
class=
'dtl'>
718 <input type=
"password" name=
"frm_pin2" size=
"8" maxlength=
"6">
722 <td nowrap align=
"right" class=
"hdr"> </td>
723 <td nowrap
class=
'dtl'> </td>
725 <?php
if ($Full_Access): ?>
727 <td nowrap align=
"center" class=
"hdr" colspan =
"2" style=
"font-size:1.5em">
732 <td nowrap align=
"right" class=
"hdr" valign=
"top">
734 <span
class=
"iegreen"><br><br>ie.<br>192.168.168<Br>192.168.169.11<br></span>
736 <td nowrap
class=
'dtl' valign=
"top">
737 <textarea rows=6 cols=20 name=
"frm_ipr"><?php echo $disp_ipr; ?></textarea>
741 <td nowrap align=
"right" class=
"hdr" valign=
"top">
742 Single alternate IP Address:
744 <td nowrap
class=
'dtl' valign=
"top">
745 <input type=
"text" name=
"frm_altip" size=15 maxlength=15 value=
"<?php echo $disp_altip; ?>">
746 <span
class=
"iegreen">ie.192.168.168 or 192.168.169.11</span>
750 <td nowrap align=
"right" class=
"hdr" valign=
"top">
753 <td nowrap
class=
'dtl'>
754 <!-- show available Scripts -->
755 <script language=
'javascript'>
757 function selectOption(pDirect, pTo, pFrom) {
766 elementcount = document.hcuform.elements[pFrom].options.length;
769 for (i = 0; i < elementcount; i++) {
770 if (document.hcuform.elements[pFrom].options[i - offset].selected) {
771 value = document.hcuform.elements[pFrom].options[i - offset].value;
772 text = document.hcuform.elements[pFrom].options[i - offset].text;
773 document.hcuform.elements[pFrom].options[i - offset] =
null;
774 pos = document.hcuform.elements[pTo].options.length;
775 option =
new Option(text,value);
776 document.hcuform.elements[pTo].options[pos] = option;
783 function selectAll() {
785 for (i=0; i < document.hcuform.elements[
'frm_Scr_Sel[]'].options.length; i++) {
786 document.hcuform.elements[
'frm_Scr_Sel[]'].options[i].selected =
true;
790 <table cellspacing=
"3" cellpadding=
"0" border=
"0">
793 <select name=
"frm_Scr_Avail[]" multiple size=
"10" >
794 <?php
foreach ($disp_allow as $key => $value) { ?>
795 <option value=
"<?php echo dms_disphtml($value); ?>"><?php echo dms_disphtml($value); ?></option>
800 <input type=
"button" value=
">>" onClick=
"selectOption('Add','frm_Scr_Sel[]','frm_Scr_Avail[]')"><br>
801 <input type=
"button" value=
"<<" onClick=
"selectOption('Remove', 'frm_Scr_Avail[]','frm_Scr_Sel[]')">
804 <!-- show selected scripts -->
805 <select name=
"frm_Scr_Sel[]" multiple size=
"10">
806 <?php
foreach ($disp_select as $key => $value) { ?>
807 <option value=
"<?php echo dms_disphtml($value); ?>"><?php echo dms_disphtml($value); ?></option>
816 <td nowrap align=
"right" class=
"hdr">
819 <td nowrap
class=
'dtl'>
820 <input type=
"text" name=
"frm_fr" size=
"2" maxlength=
"2" value=
"<?php echo $disp_fr?>">
824 <td nowrap align=
"right" class=
"hdr">
827 <td nowrap
class=
'dtl'>
828 <input type=
"checkbox" name=
"frm_fc" <?php echo ($disp_fc ==
"Y" ?
"CHECKED" :
""); ?> value=
"Y">
832 <td nowrap align=
"right" class=
"hdr">
835 <td nowrap
class=
'dtl'>
836 <input type=
"text" name=
"frm_chg" size=
"2" maxlength=
"2" value=
"<?php echo $disp_chg; ?>">
841 <td nowrap align=
"center" class=
"hdr" colspan =
"2" style=
"font-size:1.5em">
847 <table width=
'100%' border=0 cellpadding=0 cellspacing=0>
849 <td
class=
"hdr" align=
"center" width=
"33%">Last Login</td>
850 <td
class=
"hdr" align=
"center" width=
"33%">Prior Login</td>
851 <td
class=
"hdr" align=
"center" width=
"33%">Failed Login</td>
854 <td
class=
"dtl" align=
"center"> <?php echo $disp_lastlogin; ?><input type=
"hidden" name=
"frm_ll" value=
"<?php echo $disp_lastlogin; ?>"></td>
855 <td
class=
"dtl" align=
"center"> <?php echo $disp_priorlogin; ?><input type=
"hidden" name=
"frm_pl" value=
"<?php echo $disp_priorlogin; ?>"></td>
856 <td
class=
"dtl" align=
"center"> <?php echo $disp_failedlogin; ?><input type=
"hidden" name=
"frm_fl" value=
"<?php echo $disp_failedlogin; ?>"></td>
861 <?php
if ($Full_Access): ?>
863 <td
class=
'dtl'> </td>
864 <td nowrap
class=
'dtl'>
865 <?php remote_update_list(); ?>
870 <td
class=
'dtl'> </td>
871 <td nowrap
class=
'dtl'>
872 <input type=
"submit" name=
"btnSave" Value=
"Save" onClick=
"selectAll();">
873 <input type=
"button" name=
"Cancel" Value=
"Cancel" onClick=
"document.location='hcuusers.prg'">
882 cu_header(
"HomeCU Users");
888 $query =
"SELECT user_name, failedremain, forcechange, forceremain, 889 lastlogin, priorlogin, failedlogin 890 FROM dmsmonitorusers ORDER BY user_name ";
891 $prod_result = db_query($query, $link);
895 <!-- Print out the top of the table -->
897 <table border=
"0" cellpadding=
"3" cellspacing=
"0" align=
"center" class=
'dmsbg' width=
"500"><tr><td>
898 <table border=
"0" cellpadding=
"1" cellspacing=
"0" align=
"center" width=
"100%" bgcolor=white>
900 <td colspan=
"5" class=
"bar" align=
"center">
901 HomeCU Monitor Users List
904 <?php
if (isset($msg)): ?>
906 <td colspan=
"5" class=
"msg" align=
"center">
912 <td
class=
"hdr" align=
"left">
915 <td
class=
"hdr" align=
"left">
918 <td
class=
"hdr" align=
"left">
921 <td
class=
"hdr" align=
"left">
924 <td
class=
"hdr" align=
"center">
931 while ($prod_row = db_fetch_object($prod_result, $row)):
934 <tr
class=
"<?php echo $RGB; ?>">
935 <td nowrap
class=
"dtl">
936 <a href=
"hcuusers.prg?act=1&un=<?php echo strtolower(trim($prod_row->user_name)) ?>">
937 <?php echo trim($prod_row->user_name) ?>
940 <td nowrap
class=
"dtl">
941 <?php echo trim($prod_row->lastlogin) ?>
943 <td nowrap
class=
"dtl">
944 <?php echo trim($prod_row->failedremain) ?>
946 <td nowrap
class=
"dtl">
947 <?php echo trim($prod_row->failedlogin) ?>
949 <td nowrap
class=
"dtl">
957 $RGB = ($RGB ==
"odd" ?
"even" :
"odd");
962 <a href=
"hcuusers.prg?act=1">Add HomeCU Monitor
User</a>
964 <a href=
"<?php echo $infourl ?>/hcuadm/cuilist.prg" target=
"parent">Credit Union List</a>
972 cu_header(
"Error Displaying Form");
974 printError(
"Requested form not found!<br>Cancelling action.");