2 $monLibrary= dirname(__FILE__) .
"/../library";
3 $monIncludes= dirname(__FILE__) .
"/../includes";
4 require_once(
"$monLibrary/cu_top.i");
5 require_once(
"$monLibrary/ck_hticket.i");
6 require_once(
"$monIncludes/cu_remote_top.prg");
8 if (!CheckPerm($link, $Hu, basename($_SERVER[
'SCRIPT_NAME']), $_SERVER[
'REMOTE_ADDR'])) {
11 header(
"Location: /hcuadm/hcu_noperm.prg");
15 $dms_ok=array(
'act'=>
'string',
'vc'=>
'string',
'ssovendor'=>
'string',
'ssotype'=>
'string',
'ssodesc'=>
'string',
'contact'=>
'string',
'email'=>
'string',
'form_err'=>
'string',
'msg'=>
'string',
'phone'=>
'string',
'setup'=>
'string',
'comments'=>
'string',
'Remote_Update'=>
'array');
19 #case "1": // Edit Cu Image Vendors (vc=code sets edit mode, otherwise add) 20 #case "2": // Contacts list 21 #case "3": // Save add/change edits 22 #case "4": // Pop-up requirements list - bill pay vendors 23 #case "5": // Pop-up requirements list - trusted access vendor 24 #case "6": // Pop-up requirements card - selected vendor 27 if (!isset($act)) $act =
"2";
31 cu_header(
"Edit CU SSO Vendors");
33 <form action=
"cusso.prg?act=3" method=
"post">
40 where ssovendor = '$vc'";
41 $result = db_query($query, $link);
43 $cusso_row = db_fetch_object($result);
44 $num_rows = db_num_rows($result);
46 if (isset($form_err) && strlen($form_err) > 0)
47 printf(
"\n<font color=\"red\">Errors found before saving the information. Please review errors at bottom of screen.\n<p></font>");
50 <table cellpadding=
"3" cellspacing=
"0" border=
"0" width=
"50%" class=
"dmsbg"><tr><td>
51 <table cellpadding=
"1" cellspacing=
"0" border=
"0" bgcolor=white>
53 <td colspan=
"4" class=
"bar" align=
"center">
54 <?php
if($num_rows > 0): ?>
61 <?php
if (isset($msg)): ?>
63 <td colspan=
"4" class=
"msg" align=
"center">
69 <td nowrap align=
"right" class=
"hdr">
72 <td nowrap
class=
'dtl'>
75 $cu_info = htmlspecialchars(trim($cusso_row->ssovendor));
77 $cu_info = isset($ssovendor) ? set_string($ssovendor) :
"";
80 <input type=
"text" name=
"ssovendor" size=
"10" maxlength=
"10" value=
"<?php echo $cu_info ?>">
84 <td nowrap valign=
"top" align=
"right" class=
"hdr">
87 <td nowrap
class=
'dtl'>
90 $cu_info = htmlspecialchars(trim($cusso_row->ssotype));
92 $cu_info = isset($ssotype) ? set_string($ssotype) :
"";
95 <input type=
"text" name=
"ssotype" size=
"8" maxlength=
"1" value=
"<?php echo $cu_info ?>"> <font color=
'green'>B=Billpay, C=Credit Card Info, E=E-Statement, O=Other</font>
99 <td nowrap valign=
"top" align=
"right" class=
"hdr">
102 <td nowrap
class=
'dtl'>
105 $cu_info = htmlspecialchars(trim($cusso_row->ssodesc));
107 $cu_info = isset($ssodesc) ? set_string($ssodesc) :
"";
110 <input type=
"text" name=
"ssodesc" size=
"20" maxlength=
"30" value=
"<?php echo $cu_info ?>">
114 <td nowrap align=
"right" class=
"hdr">
117 <td nowrap
class=
'dtl'>
120 $cu_info = htmlspecialchars(trim($cusso_row->contact));
122 $cu_info = isset($contact) ? set_string($contact) :
"";
125 <input type=
"text" name=
"contact" size=
"24" maxlength=
"40" value=
"<?php echo $cu_info ?>">
129 <td nowrap align=
"right" class=
"hdr">
132 <td nowrap
class=
'dtl' >
135 $cu_info = htmlspecialchars(trim($cusso_row->email));
137 $cu_info = isset($email) ? set_string($email) :
"";
140 <input type=
"text" name=
"email" size=
"24" maxlength=
"50" value=
"<?php echo $cu_info ?>">
143 <td nowrap align=
"right" class=
"hdr">
146 <td nowrap
class=
'dtl'>
149 $cu_info = htmlspecialchars(trim($cusso_row->phone));
151 $cu_info = isset($phone) ? set_string($phone) :
"";
154 <input type=
"text" name=
"phone" size=
"15" maxlength=
"20" value=
"<?php echo $cu_info ?>">
158 <td nowrap align=
"right" class=
"hdr" valign=
"top">
161 <td nowrap
class=
'dtl'>
164 $cu_info = htmlspecialchars(trim($cusso_row->setup));
166 $cu_info = isset($setup) ? set_string($setup) :
"";
169 <textarea name=
"setup" rows=3 cols=65 wrap=
"physical"><?php echo $cu_info; ?></textarea>
173 <td
class=
'dtl'> </td>
174 <td nowrap
class=
'dtl' colspan=
'3'>
175 <?php remote_update_list(); ?>
179 <td nowrap colspan=
"4" align=
"center" class=
'dtl'>
180 <input type=
"submit" name=
"Save" Value=
"Save">
181 <input type=
"button" name=
"Cancel" Value=
"Cancel" onClick=
"document.location='cusso.prg'">
186 if (isset($form_err))
191 echo
"</td></tr></table>";
194 cu_header(
" CU SSO Vendors");
200 $query =
"SELECT * FROM cussovendors ORDER BY ssovendor";
201 $prod_result = db_query($query, $link);
205 <!-- Print out the top of the table -->
207 <table border=
"0" cellpadding=
"3" cellspacing=
"0" align=
"center" width=
"60%" class=
"dmsbg"><tr><td>
208 <table border=
"0" cellpadding=
"1" cellspacing=
"0" align=
"center" bgcolor=white>
210 <td colspan=
"6" class=
"bar" align=
"center">
214 <?php
if (isset($msg)): ?>
216 <td colspan=
"6" class=
"msg" align=
"center">
222 <td
class=
"hdr" align=
"left">
225 <td
class=
"hdr" align=
"left">
228 <td
class=
"hdr" align=
"left">
231 <td
class=
"hdr" align=
"left">
234 <td
class=
"hdr" align=
"left">
237 <td
class=
"hdr" align=
"left">
244 while ($prod_row = db_fetch_object($prod_result, $row)):
247 <tr
class=
"<?php echo $RGB; ?>">
248 <td
class=
'usul' nowrap >
249 <a href=
"cusso.prg?act=1&vc=<?php echo trim($prod_row->ssovendor) ?>"><?php echo trim($prod_row->ssovendor) ?></a>
251 <td
class=
'usul' nowrap >
252 <?php echo trim($prod_row->ssotype) ?>
254 <td
class=
'usul' nowrap >
255 <?php echo trim($prod_row->ssodesc) ?>
257 <td
class=
'usul' nowrap>
258 <?php echo trim($prod_row->contact) ?>
260 <td
class=
'usul' nowrap>
261 <?php echo trim($prod_row->phone) ?>
263 <td
class=
'usul' nowrap>
264 <?php echo trim($prod_row->email) ?>
268 $RGB = ($RGB ==
"odd" ?
"even" :
"odd");
274 <a href=
"cusso.prg?act=1" >Add CU SSO Vendor</a>
276 <a href=
"cusso.prg?act=4">Bill Pay Requirements List</a>
278 <a href=
"cusso.prg?act=5">Trusted Access Requirements List</a>
280 <a href=
"<?php echo $infourl ?>/hcuadm/cuilist.prg" target=
"parent">Credit Union List</a>-->
288 cu_header(
"Save SSO Vendor");
290 function save_fail($msg){
292 printf(
"<script language=\"javascript\">\n");
293 printf(
"document.forms[0].elements[\"form_err\"].value = '%s';\n", $msg);
294 printf(
"document.forms[0].action=\"cusso.prg?act=1&vc=%s\";\n", $ssovendor);
295 printf(
"document.forms[0].method=\"post\";\n");
296 printf(
"document.forms[0].submit();\n");
298 printf(
"\n</form>\n </body>\n </html>\n");
304 <form action=
"cusso.prg?act=1" method=
"post">
306 $errors_found =
"No";
322 <!-- LOAD ALL HIDDEN FIELDS -->
325 <input type=
"hidden" name=
"ssovendor" value=
"<?php echo set_string($ssovendor) ?>">
326 <input type=
"hidden" name=
"ssodesc" value=
"<?php echo set_string($ssodesc) ?>">
327 <input type=
"hidden" name=
"ssotype" value=
"<?php echo set_string($ssotype) ?>">
328 <input type=
"hidden" name=
"contact" value=
"<?php echo set_string($contact) ?>">
329 <input type=
"hidden" name=
"email" value=
"<?php echo set_string($email) ?>">
330 <input type=
"hidden" name=
"phone" value=
"<?php echo set_string($phone) ?>">
331 <input type=
"hidden" name=
"comments" value=
"<?php echo set_string($setup) ?>">
333 <!-- Create a hidden field
for the form error -->
334 <input type=
"hidden" name=
"form_err" value=
"">
336 <?php
if (strlen($err_msg) > 0): ?>
339 $form_err = sprintf(
"<font size=\"+1\">ERROR! Problems with the SSO Vendor information found: <BR></font>");
340 $form_err .= sprintf(
"The following errors will need to be corrected before you will be allowed to save the form.");
341 $form_err .= sprintf(
"<P> <font color=red>%s</font>", $err_msg);
342 save_fail($form_err);
349 $save_sql =
"SELECT ssovendor FROM cussovendors WHERE ssovendor = '$ssovendor'";
351 $db_result = db_query($save_sql, $link);
353 $num_rows = db_num_rows($db_result);
354 if ($num_rows > 0 ) {
356 $qry_stmt = sprintf(
"UPDATE cussovendors ");
357 $qry_stmt .= sprintf(
"SET ssodesc ='%s', ",prep_save($ssodesc));
358 $qry_stmt .= sprintf(
"ssotype ='%s', ",prep_save($ssotype));
359 $qry_stmt .= sprintf(
"contact ='%s', ",prep_save($contact));
360 $qry_stmt .= sprintf(
"email ='%s', ",prep_save($email));
361 $qry_stmt .= sprintf(
"phone ='%s', ",prep_save($phone));
362 $qry_stmt .= sprintf(
"setup = '%s' ", prep_save($setup));
363 $qry_stmt .= sprintf(
"WHERE ssovendor = '%s'; ",$ssovendor);
365 $qry_stmt = sprintf(
"INSERT INTO cussovendors ");
366 $qry_stmt .= sprintf(
"(ssovendor, ssodesc, ssotype,");
367 $qry_stmt .= sprintf(
" contact, email, phone,");
368 $qry_stmt .= sprintf(
" setup) ");
369 $qry_stmt .= sprintf(
" VALUES (");
370 $qry_stmt .= sprintf(
"'%s', '%s', '%s', '%s', '%s', '%s', '%s'); ",
371 strtoupper(prep_save($ssovendor)),
381 if (!($db_result=db_query($qry_stmt, $link))) {
384 $form_err .=
"<font face=\"Arial\" size=\"2\">Unable to Save Home CU SSO Vendor!<br></font><br>";
385 save_fail($form_err);
387 printError(sprintf(
"SSO Vendor Saved Successfully.<br> 388 <a href=\"cusso.prg?act=2\" target=\"CONTENT\">CU SSO Vendor List</a>"));
391 if (Remote_Update_Selected()) {
394 Remote_Field_Add(
"cussovnd",
"ssocode", $ssovendor);
395 Remote_Field_Add(
"cussovnd",
"ssodesc", $ssodesc);
396 Remote_Field_Add(
"cussovnd",
"ssotype", $ssotype);
397 Remote_Field_Add(
"cussovnd",
"ssocnt", $contact);
398 Remote_Field_Add(
"cussovnd",
"ssophn", $phone);
399 Remote_Field_Add(
"cussovnd",
"ssoem", $email);
400 Remote_Field_Add(
"cussovnd",
"ssosetup", $setup);
404 $Remote_Results = Remote_Update_Send(
"U",
"cussovnd");
407 header (
"Location: " . $_SERVER[
'PHP_SELF'] .
"?msg=" . urlencode($Remote_Results));
423 # display corporate requirements list for monitor pop-up help 424 cu_header(
" CU Bill Pay Vendors");
430 $query =
"SELECT ssovendor, ssodesc, setup 431 FROM cussovendors where ssotype = 'B' 433 $prod_result = db_query($query, $link);
437 <!-- Print out the top of the table -->
439 <table border=
"0" cellpadding=
"3" cellspacing=
"0" align=
"center" width=
"80%" class=
"dmsbg"><tr><td>
440 <table border=
"0" cellpadding=
"1" cellspacing=
"0" align=
"center" bgcolor=white width=
"98%">
442 <td colspan=
"3" class=
"bar" align=
"center">
443 CU BILL PAY VENDORS REQUIREMENTS
447 <td
class=
"hdr" align=
"left" width=
"17%">
450 <td
class=
"hdr" align=
"left" width=
"35%">
453 <td
class=
"hdr" align=
"left" width=
"*">
460 while ($prod_row = db_fetch_object($prod_result, $row)):
463 <tr
class=
"<?php echo $RGB; ?>">
464 <td
class=
'usul' nowrap>
465 <a href=
"cusso.prg?act=1&vc=<?php echo trim($prod_row->ssovendor) ?>"><?php echo trim($prod_row->ssovendor) ?></a>
468 <?php echo trim($prod_row->ssodesc) ?>
470 <td
class=
'usul' nowrap>
471 <?php echo trim($prod_row->setup) ?>
475 $RGB = ($RGB ==
"odd" ?
"even" :
"odd");
480 <a href=
"cusso.prg?act=2"> CU SSO Vendors List</a>
490 # display corporate requirements list for monitor pop-up help 491 cu_header(
" CU Trusted Access Vendors");
497 $query =
"SELECT ssovendor, ssodesc, ssotype, setup FROM cussovendors where ssotype <> 'B' 499 $prod_result = db_query($query, $link);
503 <!-- Print out the top of the table -->
505 <table border=
"0" cellpadding=
"3" cellspacing=
"0" align=
"center" width=
"80%" class=
"dmsbg"><tr><td>
506 <table border=
"0" cellpadding=
"1" cellspacing=
"0" align=
"center" bgcolor=white width=
"98%">
508 <td colspan=
"4" class=
"bar" align=
"center">
509 CU TRUSTED ACCESS VENDORS REQUIREMENTS
513 <td
class=
"hdr" align=
"left" width=
"17%">
514 CU Trusted Access Vendor
516 <td
class=
"hdr" align=
"left" width=
"5%">
519 <td
class=
"hdr" align=
"left" width=
"35%">
522 <td
class=
"hdr" align=
"left" width=
"*">
529 while ($prod_row = db_fetch_object($prod_result, $row)):
532 <tr
class=
"<?php echo $RGB; ?>">
533 <td
class=
'usul' nowrap>
534 <a href=
"cusso.prg?act=1&vc=<?php echo trim($prod_row->ssovendor) ?>"><?php echo trim($prod_row->ssovendor) ?></a>
537 <?php echo trim($prod_row->ssotype) ?>
540 <?php echo trim($prod_row->ssodesc) ?>
542 <td
class=
'usul' nowrap>
543 <?php echo trim($prod_row->setup) ?>
547 $RGB = ($RGB ==
"odd" ?
"even" :
"odd");
552 <a href=
"cusso.prg?act=2"> CU SSO Vendors List</a>
562 # display corporate requirements card for monitor pop-up help 563 cu_header(
" CU Trusted Access Vendors");
569 $query =
"SELECT ssovendor, ssodesc, contact, phone, setup,comments, 570 ssotype FROM cussovendors where ssovendor = '$vc'";
571 $prod_result = db_query($query, $link);
572 $prod_row = db_fetch_object($prod_result, 0);
574 if ($prod_row->ssotype ==
'B' ){ $stype=
'4';}
579 <!-- Print out the top of the table -->
581 <table border=
"0" cellpadding=
"3" cellspacing=
"0" align=
"center" width=
"80%" class=
"dmsbg"><tr><td>
582 <table border=
"0" cellpadding=
"1" cellspacing=
"0" align=
"center" bgcolor=
'white' width=
'100%'>
584 <td colspan=
"4" class=
"bar" align=
"center">
585 CU TRUSTED ACCESS VENDOR <?php echo $vc; ?>
589 <td
class=
'usul' nowrap>
590 <a href=
"cusso.prg?act=1&vc=<?php echo trim($prod_row->ssovendor) ?>"><?php echo trim($prod_row->ssovendor) ?></a>
593 <?php echo trim($prod_row->ssodesc) ?>
596 <?php echo trim($prod_row->contact) ?>
599 <?php echo trim($prod_row->phone) ?>
603 <td colspan=
'4' class=
'usul'>
604 <?php echo trim($prod_row->comments) ?>
608 <td colspan=
'4' class=
'usul' align=
'center'>
613 <td colspan=
'4' class=
'usul'>
614 <?php echo trim($prod_row->setup) ?>
618 <td colspan=
"4" class=
'dtlr'>
619 <a href=
"cusso.prg?act=<?php echo $stype; ?>">Show All Vendors</a>
628 cu_header(
"Error Displaying Form");
630 printError(
"Requested form not found!<br>Cancelling action.");