3 $monLibrary= dirname(__FILE__) .
"/../library";
4 $monIncludes= dirname(__FILE__) .
"/../includes";
5 require_once(
"$monLibrary/cu_top.i");
6 require_once(
"$monLibrary/ck_hticket.i");
7 require_once(
"$monIncludes/cu_remote_top.prg");
9 if (!CheckPerm($link, $Hu, basename($_SERVER[
'SCRIPT_NAME']), $_SERVER[
'REMOTE_ADDR'])) {
12 header(
"Location: /hcuadm/hcu_noperm.prg");
16 $dms_ok=array(
'act'=>
'string',
'addr1'=>
'string',
'addr2'=>
'string',
17 'city'=>
'string',
'comments'=>
'string',
'contact1'=>
'string',
18 'contact2'=>
'string',
'contact3'=>
'string',
'datespec'=>
'string',
19 'email1'=>
'string',
'email2'=>
'string',
'email3'=>
'string',
'fax1'=>
'string',
20 'fax2'=>
'string',
'fax3'=>
'string',
'form_err'=>
'string',
'imgdesc'=>
'string',
21 'img'=>
'string',
'phone1'=>
'string',
'phone2'=>
'string',
'phone3'=>
'string',
22 'role1'=>
'string',
'role2'=>
'string',
'role3'=>
'string',
'Save'=>
'string',
23 'st'=>
'string',
'vc'=>
'string',
'zip'=>
'string',
'msg'=>
'string',
'Remote_Update'=>
'array');
26 #case "1": // Edit Cu Image Vendors (vc=code sets edit mode, otherwise add) 27 #case "2": // Contacts list 28 #case "3": // Save add/change edits 29 #case "4": // Pop-up requirements list - all vendors 30 #case "5": // Pop-up requirements card - selected vendor 32 if (!isset($act)) $act =
"2";
36 cu_header(
"Edit CU Image Vendors");
38 <form action=
"cuimage.prg?act=3" method=
"post">
46 $result = db_query($query, $link);
48 $cuimage_row = db_fetch_object($result);
49 $num_rows = db_num_rows($result);
51 if (isset($form_err) && strlen($form_err) > 0)
52 printf(
"\n<font color=\"red\">Errors found before saving the information. Please review errors at bottom of screen.\n<p></font>");
55 <table cellpadding=
"3" cellspacing=
"0" border=
"0" width=
"50%" class=
"dmsbg"><tr><td>
56 <table cellpadding=
"1" cellspacing=
"0" border=
"0" bgcolor=white>
58 <td colspan=
"4" class=
"bar" align=
"center">
59 <?php
if($num_rows > 0): ?>
66 <?php
if (isset($msg)): ?>
68 <td colspan=
"4" class=
"msg" align=
"center">
74 <td nowrap align=
"right" class=
"hdr">
77 <td nowrap colspan=
"3" class=
'dtl'>
80 $cu_info = htmlspecialchars(trim($cuimage_row->img));
82 $cu_info = isset($img) ? set_string($img) :
"";
85 <input type=
"text" name=
"img" size=
"10" maxlength=
"10" value=
"<?php echo $cu_info ?>">
89 <td nowrap valign=
"top" align=
"right" class=
"hdr">
92 <td nowrap colspan=
"3" class=
'dtl'>
95 $cu_info = htmlspecialchars(trim($cuimage_row->imgdesc));
97 $cu_info = isset($imgdesc) ? set_string($imgdesc) :
"";
100 <input type=
"text" name=
"imgdesc" size=
"20" maxlength=
"30" value=
"<?php echo $cu_info ?>">
104 <td nowrap valign=
"top" align=
"right" class=
"hdr">
107 <td nowrap colspan=
"3" class=
'dtl'>
110 $cu_info = htmlspecialchars(trim($cuimage_row->addr1));
112 $cu_info = isset($addr1) ? set_string($addr1) :
"";
115 <input type=
"text" name=
"addr1" size=
"25" maxlength=
"40" value=
"<?php echo $cu_info ?>">
119 $cu_info = htmlspecialchars(trim($cuimage_row->addr2));
121 $cu_info = isset($addr2) ? set_string($addr2) :
"";
124 <input type=
"text" name=
"addr2" size=
"25" maxlength=
"40" value=
"<?php echo $cu_info ?>">
128 $cu_info = htmlspecialchars(trim($cuimage_row->city));
130 $cu_info = isset($city) ? set_string($city) :
"";
133 <input type=
"text" name=
"city" size=
"16" maxlength=
"25" value=
"<?php echo $cu_info ?>">
137 $cu_info = htmlspecialchars(trim($cuimage_row->st));
139 $cu_info = isset($st) ? set_string($st) :
"";
142 <select name=
"st" size=1>
143 <OPTION VALUE=
""><Select>
144 <OPTION VALUE=
"AL" <?php
if ($cu_info ==
"AL")echo
"SELECTED" ?>> Alabama
145 <OPTION VALUE=
"AK" <?php
if ($cu_info ==
"AK")echo
"SELECTED" ?>> Alaska
146 <OPTION VALUE=
"AZ" <?php
if ($cu_info ==
"AZ")echo
"SELECTED" ?>> Arizona
147 <OPTION VALUE=
"AR" <?php
if ($cu_info ==
"AR")echo
"SELECTED" ?>> Arkansas
148 <OPTION VALUE=
"CA" <?php
if ($cu_info ==
"CA")echo
"SELECTED" ?>> California
149 <OPTION VALUE=
"CO" <?php
if ($cu_info ==
"CO")echo
"SELECTED" ?>> Colorado
150 <OPTION VALUE=
"CT" <?php
if ($cu_info ==
"CT")echo
"SELECTED" ?>> Connecticut
151 <OPTION VALUE=
"DE" <?php
if ($cu_info ==
"DE")echo
"SELECTED" ?>> Delaware
152 <OPTION VALUE=
"DC" <?php
if ($cu_info ==
"DC")echo
"SELECTED" ?>> District of Columbia
153 <OPTION VALUE=
"FL" <?php
if ($cu_info ==
"FL")echo
"SELECTED" ?>> Florida
154 <OPTION VALUE=
"GA" <?php
if ($cu_info ==
"GA")echo
"SELECTED" ?>> Georgia
155 <OPTION VALUE=
"HI" <?php
if ($cu_info ==
"HI")echo
"SELECTED" ?>> Hawaii
156 <OPTION VALUE=
"ID" <?php
if ($cu_info ==
"ID")echo
"SELECTED" ?>> Idaho
157 <OPTION VALUE=
"IL" <?php
if ($cu_info ==
"IL")echo
"SELECTED" ?>> Illinois
158 <OPTION VALUE=
"IN" <?php
if ($cu_info ==
"IN")echo
"SELECTED" ?>> Indiana
159 <OPTION VALUE=
"IA" <?php
if ($cu_info ==
"IA")echo
"SELECTED" ?>> Iowa
160 <OPTION VALUE=
"KS" <?php
if ($cu_info ==
"KS")echo
"SELECTED" ?>> Kansas
161 <OPTION VALUE=
"KY" <?php
if ($cu_info ==
"KY")echo
"SELECTED" ?>> Kentucky
162 <OPTION VALUE=
"LA" <?php
if ($cu_info ==
"LA")echo
"SELECTED" ?>> Louisiana
163 <OPTION VALUE=
"ME" <?php
if ($cu_info ==
"ME")echo
"SELECTED" ?>> Maine
164 <OPTION VALUE=
"MD" <?php
if ($cu_info ==
"MD")echo
"SELECTED" ?>> Maryland
165 <OPTION VALUE=
"MA" <?php
if ($cu_info ==
"MA")echo
"SELECTED" ?>> Massachusetts
166 <OPTION VALUE=
"MI" <?php
if ($cu_info ==
"MI")echo
"SELECTED" ?>> Michigan
167 <OPTION VALUE=
"MN" <?php
if ($cu_info ==
"MN")echo
"SELECTED" ?>> Minnesota
168 <OPTION VALUE=
"MS" <?php
if ($cu_info ==
"MS")echo
"SELECTED" ?>> Mississippi
169 <OPTION VALUE=
"MO" <?php
if ($cu_info ==
"MO")echo
"SELECTED" ?>> Missouri
170 <OPTION VALUE=
"MT" <?php
if ($cu_info ==
"MT")echo
"SELECTED" ?>> Montana
171 <OPTION VALUE=
"NE" <?php
if ($cu_info ==
"NE")echo
"SELECTED" ?>> Nebraska
172 <OPTION VALUE=
"NV" <?php
if ($cu_info ==
"NV")echo
"SELECTED" ?>> Nevada
173 <OPTION VALUE=
"NH" <?php
if ($cu_info ==
"NH")echo
"SELECTED" ?>> New Hampshire
174 <OPTION VALUE=
"NJ" <?php
if ($cu_info ==
"NJ")echo
"SELECTED" ?>> New Jersey
175 <OPTION VALUE=
"NM" <?php
if ($cu_info ==
"NM")echo
"SELECTED" ?>> New Mexico
176 <OPTION VALUE=
"NY" <?php
if ($cu_info ==
"NY")echo
"SELECTED" ?>> New York
177 <OPTION VALUE=
"NC" <?php
if ($cu_info ==
"NC")echo
"SELECTED" ?>> North Carolina
178 <OPTION VALUE=
"ND" <?php
if ($cu_info ==
"ND")echo
"SELECTED" ?>> North Dakota
179 <OPTION VALUE=
"OH" <?php
if ($cu_info ==
"OH")echo
"SELECTED" ?>> Ohio
180 <OPTION VALUE=
"OK" <?php
if ($cu_info ==
"OK")echo
"SELECTED" ?>> Oklahoma
181 <OPTION VALUE=
"OR" <?php
if ($cu_info ==
"OR")echo
"SELECTED" ?>> Oregon
182 <OPTION VALUE=
"PA" <?php
if ($cu_info ==
"PA")echo
"SELECTED" ?>> Pennsylvania
183 <OPTION VALUE=
"RI" <?php
if ($cu_info ==
"RI")echo
"SELECTED" ?>> Rhode Island
184 <OPTION VALUE=
"SC" <?php
if ($cu_info ==
"SC")echo
"SELECTED" ?>> South Carolina
185 <OPTION VALUE=
"SD" <?php
if ($cu_info ==
"SD")echo
"SELECTED" ?>> South Dakota
186 <OPTION VALUE=
"TN" <?php
if ($cu_info ==
"TN")echo
"SELECTED" ?>> Tennessee
187 <OPTION VALUE=
"TX" <?php
if ($cu_info ==
"TX")echo
"SELECTED" ?>> Texas
188 <OPTION VALUE=
"UT" <?php
if ($cu_info ==
"UT")echo
"SELECTED" ?>> Utah
189 <OPTION VALUE=
"VT" <?php
if ($cu_info ==
"VT")echo
"SELECTED" ?>> Vermont
190 <OPTION VALUE=
"VA" <?php
if ($cu_info ==
"VA")echo
"SELECTED" ?>> Virginia
191 <OPTION VALUE=
"WA" <?php
if ($cu_info ==
"WA")echo
"SELECTED" ?>> Washington
192 <OPTION VALUE=
"WV" <?php
if ($cu_info ==
"WV")echo
"SELECTED" ?>> West Virginia
193 <OPTION VALUE=
"WI" <?php
if ($cu_info ==
"WI")echo
"SELECTED" ?>> Wisconsin
194 <OPTION VALUE=
"WY" <?php
if ($cu_info ==
"WY")echo
"SELECTED" ?>> Wyoming
195 <OPTION VALUE=
"VI" <?php
if ($cu_info ==
"VI")echo
"SELECTED" ?>> U.S. Virgin Islands
200 $cu_info = htmlspecialchars(trim($cuimage_row->zip));
202 $cu_info = isset($zip) ? set_string($zip) :
"";
205 <input type=
"text" name=
"zip" size=
"10" maxlength=
"15" value=
"<?php echo $cu_info ?>">
209 <td nowrap align=
"center" class=
'dtl'>
212 <td nowrap align=
"center" class=
"dtl">
215 <td nowrap align=
"center" class=
"dtl">
218 <td nowrap align=
"center" class=
"dtl">
223 <td nowrap align=
"right" class=
"hdr">
226 <td nowrap
class=
'dtl'>
229 $cu_info = htmlspecialchars(trim($cuimage_row->contact1));
231 $cu_info = isset($contact1) ? set_string($contact1) :
"";
234 <input type=
"text" name=
"contact1" size=
"24" maxlength=
"40" value=
"<?php echo $cu_info ?>">
236 <td nowrap
class=
'dtl'>
239 $cu_info = htmlspecialchars(trim($cuimage_row->contact2));
241 $cu_info = isset($contact2) ? set_string($contact2) :
"";
244 <input type=
"text" name=
"contact2" size=
"24" maxlength=
"40" value=
"<?php echo $cu_info ?>">
246 <td nowrap
class=
'dtl'>
249 $cu_info = htmlspecialchars(trim($cuimage_row->contact3));
251 $cu_info = isset($contact3) ? set_string($contact3) :
"";
254 <input type=
"text" name=
"contact3" size=
"24" maxlength=
"40" value=
"<?php echo $cu_info ?>">
258 <td nowrap align=
"right" class=
"hdr">
261 <td nowrap
class=
'dtl' >
264 $cu_info = htmlspecialchars(trim($cuimage_row->email1));
266 $cu_info = isset($email1) ? set_string($email1) :
"";
269 <input type=
"text" name=
"email1" size=
"24" maxlength=
"50" value=
"<?php echo $cu_info ?>">
271 <td nowrap
class=
'dtl'>
274 $cu_info = htmlspecialchars(trim($cuimage_row->email2));
276 $cu_info = isset($email2) ? set_string($email2) :
"";
279 <input type=
"text" name=
"email2" size=
"24" maxlength=
"50" value=
"<?php echo $cu_info ?>">
281 <td nowrap
class=
'dtl'>
284 $cu_info = htmlspecialchars(trim($cuimage_row->email3));
286 $cu_info = isset($email3) ? set_string($email3) :
"";
289 <input type=
"text" name=
"email3" size=
"24" maxlength=
"50" value=
"<?php echo $cu_info ?>">
293 <td nowrap align=
"right" class=
"hdr">
296 <td nowrap
class=
'dtl'>
299 $cu_info = htmlspecialchars(trim($cuimage_row->phone1));
301 $cu_info = isset($phone1) ? set_string($phone1) :
"";
304 <input type=
"text" name=
"phone1" size=
"15" maxlength=
"20" value=
"<?php echo $cu_info ?>">
306 <td nowrap
class=
'dtl'>
309 $cu_info = htmlspecialchars(trim($cuimage_row->phone2));
311 $cu_info = isset($phone2) ? set_string($phone2) :
"";
314 <input type=
"text" name=
"phone2" size=
"15" maxlength=
"20" value=
"<?php echo $cu_info ?>">
316 <td nowrap
class=
'dtl'>
319 $cu_info = htmlspecialchars(trim($cuimage_row->phone3));
321 $cu_info = isset($phone3) ? set_string($phone3) :
"";
324 <input type=
"text" name=
"phone3" size=
"15" maxlength=
"20" value=
"<?php echo $cu_info ?>">
328 <td nowrap align=
"right" class=
"hdr">
331 <td nowrap
class=
'dtl'>
334 $cu_info = htmlspecialchars(trim($cuimage_row->fax1));
336 $cu_info = isset($fax1) ? set_string($fax1) :
"";
339 <input type=
"text" name=
"fax1" size=
"15" maxlength=
"20" value=
"<?php echo $cu_info ?>">
341 <td nowrap
class=
'dtl'>
344 $cu_info = htmlspecialchars(trim($cuimage_row->fax2));
346 $cu_info = isset($fax2) ? set_string($fax2) :
"";
349 <input type=
"text" name=
"fax2" size=
"15" maxlength=
"20" value=
"<?php echo $cu_info ?>">
351 <td nowrap
class=
'dtl'>
354 $cu_info = htmlspecialchars(trim($cuimage_row->fax3));
356 $cu_info = isset($fax3) ? set_string($fax3) :
"";
359 <input type=
"text" name=
"fax3" size=
"15" maxlength=
"20" value=
"<?php echo $cu_info ?>">
363 <td nowrap align=
"right" class=
"hdr">
366 <td nowrap
class=
'dtl'>
369 $cu_info = htmlspecialchars(trim($cuimage_row->role1));
371 $cu_info = isset($role1) ? set_string($role1) :
"";
374 <input type=
"text" name=
"role1" size=
"24" maxlength=
"40" value=
"<?php echo $cu_info ?>">
376 <td nowrap
class=
'dtl'>
379 $cu_info = htmlspecialchars(trim($cuimage_row->role2));
381 $cu_info = isset($role2) ? set_string($role2) :
"";
384 <input type=
"text" name=
"role2" size=
"24" maxlength=
"40" value=
"<?php echo $cu_info ?>">
386 <td nowrap
class=
'dtl'>
389 $cu_info = htmlspecialchars(trim($cuimage_row->role3));
391 $cu_info = isset($role3) ? set_string($role3) :
"";
394 <input type=
"text" name=
"role3" size=
"24" maxlength=
"40" value=
"<?php echo $cu_info ?>">
398 <td colspan=
"4" class=
'dtl'>
403 <td nowrap align=
"right" class=
"hdr" valign=
"top">
406 <td nowrap colspan=
"3" class=
'dtl'>
409 $cu_info = htmlspecialchars(trim($cuimage_row->comments));
411 $cu_info = isset($comments) ? set_string($comments) :
"";
414 <textarea name=
"comments" rows=3 cols=65 wrap=
"physical"><?php echo $cu_info; ?></textarea>
418 <td nowrap align=
"right" class=
"hdr" valign=
"top">
421 <td nowrap colspan=
"3" class=
'dtl'>
424 $cu_info = htmlspecialchars(trim($cuimage_row->datespec));
426 $cu_info = isset($datespec) ? set_string($datespec) :
"";
429 <textarea name=
"datespec" rows=3 cols=65 wrap=
"physical"><?php echo $cu_info; ?></textarea>
433 <td
class=
'dtl'> </td>
434 <td nowrap
class=
'dtl' colspan=
'3'>
435 <?php remote_update_list(); ?>
439 <td nowrap colspan=
"4" align=
"center" class=
'dtl'>
440 <input type=
"submit" name=
"Save" Value=
"Save">
441 <input type=
"button" name=
"Cancel" Value=
"Cancel" onClick=
"document.location='cuimage.prg'">
446 if (isset($form_err))
451 echo
"</td></tr></table>";
454 cu_header(
"CU Image Vendors");
460 $query =
"SELECT * FROM cuimagevendors ORDER BY img";
461 $prod_result = db_query($query, $link);
465 <!-- Print out the top of the table -->
467 <table border=
"0" cellpadding=
"3" cellspacing=
"0" align=
"center" width=
"50%" class=
"dmsbg"><tr><td>
468 <table border=
"0" cellpadding=
"1" cellspacing=
"0" align=
"center" bgcolor=white>
470 <td colspan=
"4" class=
"bar" align=
"center">
471 CU IMAGE VENDORS LIST
474 <?php
if (isset($msg)): ?>
476 <td colspan=
"4" class=
"msg" align=
"center">
482 <td
class=
"hdr" align=
"left">
485 <td
class=
"hdr" align=
"left">
488 <td
class=
"hdr" align=
"left">
491 <td
class=
"hdr" align=
"left">
498 while ($prod_row = db_fetch_object($prod_result, $row)):
501 <tr
class=
"<?php echo $RGB; ?>">
502 <td
class=
'usul' nowrap >
503 <a href=
"cuimage.prg?act=1&vc=<?php echo trim($prod_row->img) ?>"><?php echo trim($prod_row->img) ?></a>
505 <td
class=
'usul' nowrap >
506 <?php echo trim($prod_row->imgdesc) ?>
508 <td
class=
'usul' nowrap>
509 <?php echo trim($prod_row->contact1) ?>
511 <td
class=
'usul' nowrap>
512 <?php echo trim($prod_row->phone1) ?>
516 $RGB = ($RGB ==
"odd" ?
"even" :
"odd");
522 <a href=
"cuimage.prg?act=1" >Add CU Image Vendor</a>
524 <a href=
"cuimage.prg?act=4">Corporate Requirements List</a>
526 <a href=
"<?php echo $infourl ?>/hcuadm/cuilist.prg" target=
"parent">Credit Union List</a>-->
534 cu_header(
"Save Image Vendor");
536 function save_fail($msg){
538 printf(
"<script language=\"javascript\">\n");
539 printf(
"document.forms[0].elements[\"form_err\"].value = '%s';\n", $msg);
540 printf(
"document.forms[0].action=\"cuimage.prg?act=1&vc=%s\";\n", $img);
541 printf(
"document.forms[0].method=\"post\";\n");
542 printf(
"document.forms[0].submit();\n");
544 printf(
"\n</form>\n </body>\n </html>\n");
550 <form action=
"cuimage.prg?act=1" method=
"post">
552 $errors_found =
"No";
568 <!-- LOAD ALL HIDDEN FIELDS -->
571 <input type=
"hidden" name=
"img" value=
"<?php echo set_string($img) ?>">
572 <input type=
"hidden" name=
"imgdesc" value=
"<?php echo set_string($imgdesc) ?>">
573 <input type=
"hidden" name=
"addr1" value=
"<?php echo set_string($addr1) ?>">
574 <input type=
"hidden" name=
"addr2" value=
"<?php echo set_string($addr2) ?>">
575 <input type=
"hidden" name=
"city" value=
"<?php echo set_string($city) ?>">
576 <input type=
"hidden" name=
"st" value=
"<?php echo set_string($st) ?>">
577 <input type=
"hidden" name=
"zip" value=
"<?php echo set_string($zip) ?>">
578 <input type=
"hidden" name=
"contact1" value=
"<?php echo set_string($contact1) ?>">
579 <input type=
"hidden" name=
"email1" value=
"<?php echo set_string($email1) ?>">
580 <input type=
"hidden" name=
"phone1" value=
"<?php echo set_string($phone1) ?>">
581 <input type=
"hidden" name=
"fax1" value=
"<?php echo set_string($fax1) ?>">
582 <input type=
"hidden" name=
"role1" value=
"<?php echo set_string($role1) ?>">
583 <input type=
"hidden" name=
"contact2" value=
"<?php echo set_string($contact2) ?>">
584 <input type=
"hidden" name=
"email2" value=
"<?php echo set_string($email2) ?>">
585 <input type=
"hidden" name=
"phone2" value=
"<?php echo set_string($phone2) ?>">
586 <input type=
"hidden" name=
"fax2" value=
"<?php echo set_string($fax2) ?>">
587 <input type=
"hidden" name=
"role2" value=
"<?php echo set_string($role2) ?>">
588 <input type=
"hidden" name=
"contact3" value=
"<?php echo set_string($contact3) ?>">
589 <input type=
"hidden" name=
"email3" value=
"<?php echo set_string($email3) ?>">
590 <input type=
"hidden" name=
"phone3" value=
"<?php echo set_string($phone3) ?>">
591 <input type=
"hidden" name=
"fax3" value=
"<?php echo set_string($fax3) ?>">
592 <input type=
"hidden" name=
"role3" value=
"<?php echo set_string($role3) ?>">
593 <input type=
"hidden" name=
"comments" value=
"<?php echo set_string($comments) ?>">
595 <!-- Create a hidden field
for the form error -->
596 <input type=
"hidden" name=
"form_err" value=
"">
598 <?php
if (strlen($err_msg) > 0): ?>
601 $form_err = sprintf(
"<font size=\"+1\">ERROR! Problems with the credit union information found: <BR></font>");
602 $form_err .= sprintf(
"The following errors will need to be corrected before you will be allowed to save the form.");
603 $form_err .= sprintf(
"<P> <font color=red>%s</font>", $err_msg);
604 save_fail($form_err);
611 $save_sql =
"SELECT img FROM cuimagevendors WHERE img = '$img'";
613 $db_result = db_query($save_sql, $link);
615 $num_rows = db_num_rows($db_result);
616 if ($num_rows > 0 ) {
618 $qry_stmt = sprintf(
"UPDATE cuimagevendors ");
619 $qry_stmt .= sprintf(
"SET imgdesc ='%s', ",prep_save($imgdesc));
620 $qry_stmt .= sprintf(
"addr1 ='%s', ",prep_save($addr1));
621 $qry_stmt .= sprintf(
"addr2 ='%s', ",prep_save($addr2));
622 $qry_stmt .= sprintf(
"city ='%s', ",prep_save($city));
623 $qry_stmt .= sprintf(
"st ='%s', ",prep_save($st));
624 $qry_stmt .= sprintf(
"zip ='%s', ",prep_save($zip));
625 $qry_stmt .= sprintf(
"contact1 ='%s', ",prep_save($contact1));
626 $qry_stmt .= sprintf(
"email1 ='%s', ",prep_save($email1));
627 $qry_stmt .= sprintf(
"phone1 ='%s', ",prep_save($phone1));
628 $qry_stmt .= sprintf(
"fax1 ='%s', ",prep_save($fax1));
629 $qry_stmt .= sprintf(
"role1 ='%s', ",prep_save($role1));
630 $qry_stmt .= sprintf(
"contact2 ='%s', ",prep_save($contact2));
631 $qry_stmt .= sprintf(
"email2 ='%s', ",prep_save($email2));
632 $qry_stmt .= sprintf(
"phone2 ='%s', ",prep_save($phone2));
633 $qry_stmt .= sprintf(
"fax2 ='%s', ",prep_save($fax2));
634 $qry_stmt .= sprintf(
"role2 ='%s', ",prep_save($role2));
635 $qry_stmt .= sprintf(
"contact3 ='%s', ",prep_save($contact3));
636 $qry_stmt .= sprintf(
"email3 ='%s', ",prep_save($email3));
637 $qry_stmt .= sprintf(
"phone3 ='%s', ",prep_save($phone3));
638 $qry_stmt .= sprintf(
"fax3 ='%s', ",prep_save($fax3));
639 $qry_stmt .= sprintf(
"role3 ='%s', ",prep_save($role3));
640 $qry_stmt .= sprintf(
"comments = '%s', ", prep_save($comments));
641 $qry_stmt .= sprintf(
"datespec = '%s' ", prep_save($datespec));
642 $qry_stmt .= sprintf(
"WHERE img = '%s'; ",$img);
644 $qry_stmt = sprintf(
"INSERT INTO cuimagevendors ");
645 $qry_stmt .= sprintf(
"(img, imgdesc, addr1, addr2, city, st, zip,");
646 $qry_stmt .= sprintf(
" contact1, email1, phone1, fax1, role1,");
647 $qry_stmt .= sprintf(
" contact2, email2, phone2, fax2, role2,");
648 $qry_stmt .= sprintf(
" contact3, email3, phone3, fax3, role3,");
649 $qry_stmt .= sprintf(
" comments, datespec) ");
650 $qry_stmt .= sprintf(
" VALUES (");
651 $qry_stmt .= sprintf(
"'%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s'); ",
652 strtoupper(prep_save($img)),
659 prep_save($contact1),
664 prep_save($contact2),
669 prep_save($contact3),
674 prep_save($comments),
675 prep_save($datespec));
678 if (!($db_result=db_query($qry_stmt, $link))) {
680 $form_err = sprintf(
"<br>");
681 $form_err .= sprintf(
"<font face=\"Arial\" size=\"2\">Unable to Save Home CU Image Vendor!</font><br>");
682 save_fail($form_err);
684 printError(sprintf(
"Image Vendor Saved Successfully.<br> 685 <a href=\"cuimage.prg?act=2\" target=\"CONTENT\">CU Image Vendor List</a>"));
688 if (Remote_Update_Selected()) {
691 Remote_Field_Add(
"cuimgvnd",
"imgcode", $img);
692 Remote_Field_Add(
"cuimgvnd",
"imgdesc", $imgdesc);
693 Remote_Field_Add(
"cuimgvnd",
"imgaddr1", $addr1);
694 Remote_Field_Add(
"cuimgvnd",
"imgaddr2", $addr2);
695 Remote_Field_Add(
"cuimgvnd",
"imgcity", $city);
696 Remote_Field_Add(
"cuimgvnd",
"imgst", $st);
697 Remote_Field_Add(
"cuimgvnd",
"imgzip", $zip);
698 Remote_Field_Add(
"cuimgvnd",
"imgcnt1", $contact1);
699 Remote_Field_Add(
"cuimgvnd",
"imgrol1", $role1);
700 Remote_Field_Add(
"cuimgvnd",
"imgphn1", $phone1);
701 Remote_Field_Add(
"cuimgvnd",
"imgem1", $email1);
702 Remote_Field_Add(
"cuimgvnd",
"imgfx1", $fax1);
703 Remote_Field_Add(
"cuimgvnd",
"imgcnt2", $contact2);
704 Remote_Field_Add(
"cuimgvnd",
"imgrol2", $role2);
705 Remote_Field_Add(
"cuimgvnd",
"imgphn2", $phone2);
706 Remote_Field_Add(
"cuimgvnd",
"imgem2", $email2);
707 Remote_Field_Add(
"cuimgvnd",
"imgfx2", $fax2);
708 Remote_Field_Add(
"cuimgvnd",
"imgcnt3", $contact3);
709 Remote_Field_Add(
"cuimgvnd",
"imgrol3", $role3);
710 Remote_Field_Add(
"cuimgvnd",
"imgphn3", $phone3);
711 Remote_Field_Add(
"cuimgvnd",
"imgem3", $email3);
712 Remote_Field_Add(
"cuimgvnd",
"imgfx3", $fax3);
713 Remote_Field_Add(
"cuimgvnd",
"imgcomm", $comments);
714 Remote_Field_Add(
"cuimgvnd",
"imgdate", $datespec);
718 $Remote_Results = Remote_Update_Send(
"U",
"cuimgvnd");
721 header (
"Location: " . $_SERVER[
'PHP_SELF'] .
"?msg=" . urlencode($Remote_Results));
737 # display corporate requirements list for monitor pop-up help 738 cu_header(
"CU Image Vendors");
744 $query =
"SELECT * FROM cuimagevendors ORDER BY img";
745 $prod_result = db_query($query, $link);
749 <!-- Print out the top of the table -->
751 <table border=
"0" cellpadding=
"3" cellspacing=
"0" align=
"center" width=
"80%" clas=
"dmsbg"><tr><td>
752 <table border=
"0" cellpadding=
"1" cellspacing=
"0" align=
"center" bgcolor=white>
754 <td colspan=
"3" class=
"bar" align=
"center">
755 CU IMAGE VENDORS REQUIREMENTS
759 <td
class=
"hdr" align=
"left" width=
"17%">
762 <td
class=
"hdr" align=
"left" width=
"35%">
765 <td
class=
"hdr" align=
"left" width=
"*">
772 while ($prod_row = db_fetch_object($prod_result, $row)):
775 <tr
class=
"<?php echo $RGB; ?>">
776 <td
class=
'usul' nowrap>
777 <a href=
"cuimage.prg?act=1&vc=<?php echo trim($prod_row->img) ?>"><?php echo trim($prod_row->img) ?></a>
780 <?php echo trim($prod_row->imgdesc) ?>
783 <?php echo trim($prod_row->datespec) ?>
787 $RGB = ($RGB ==
"odd" ?
"even" :
"odd");
792 <a href=
"cuimage.prg?act=2">CU Image Vendors List</a>
802 # display corporate requirements & contact card for monitor pop-up help 803 cu_header(
"CU Image Vendors");
809 $query =
"SELECT * FROM cuimagevendors where img='$vc'";
810 $prod_result = db_query($query, $link);
812 $prod_row = db_fetch_object($prod_result, 0);
816 <!-- Print out the top of the table -->
818 <table border=
"0" cellpadding=
"3" cellspacing=
"0" align=
"center" width=
"80%" class=
"dmsbg"><tr><td>
819 <table border=
"0" cellpadding=
"1" cellspacing=
"0" align=
"center" bgcolor=
'white' width=
'100%'>
821 <td colspan=
"4" class=
"bar" align=
"center">
822 CU IMAGE VENDOR <?php echo $vc; ?>
826 <td
class=
'usul' nowrap>
827 <a href=
"cuimage.prg?act=1&vc=<?php echo trim($prod_row->img) ?>"><?php echo trim($prod_row->img) ?></a>
830 <?php echo trim($prod_row->imgdesc) ?>
833 <?php echo trim($prod_row->contact1) ?>
836 <?php echo trim($prod_row->phone1) ?>
840 <td colspan=
'4' class=
'usul'>
841 <?php echo trim($prod_row->comments) ?>
845 <td colspan=
'4' class=
'usul' align=
'center'>
850 <td colspan=
'4' class=
'usul'>
851 <?php echo trim($prod_row->datespec) ?>
855 <td colspan=
"4" class=
'dtlr'>
856 <a href=
"cuimage.prg?act=4">Show All Image Vendors</a>
865 cu_header(
"Error Displaying Form");
867 printError(
"Requested form not found!<br>Cancelling action.");