Odyssey
AlertMntc.prg
1 <?php
2 
3 $dms_ok=array('alert'=>'string','action'=>'string','a_msg'=>'string',
4  'AddChange'=>'string','aname'=>'string','smstext'=>'string',
5  'sstart'=>'string','sstop'=>'string','todelete'=>'string',
6  'rstat'=>'string', 'msg'=>'string');
7 
8 dms_import_v2($SYSENV, "ALERT", $dms_ok);
9 $SYSENV["ALERT"]["alert"] = (empty($SYSENV["ALERT"]["alert"]) ? "" : trim($SYSENV["ALERT"]["alert"]));
10 $SYSENV["ALERT"]["self"] = $menu_link;
11 $SYSENV["ALERT"]["main_url"] = $menu_link;
12 $SYSENV["ALERT"]["helpicon"]="<img src='/IMAGES/q1.gif' border=0 alt='View Help' valign='top'>";
13 $SYSENV["ALERT"]["helpdoc"]="../static/html/AlertHelp.html";
14 $SYSENV["ALERT"]["action"] = trim(strtolower((empty($SYSENV["ALERT"]["action"]) ? "OK" : $SYSENV["ALERT"]["action"])));
15 $SYSENV["ALERT"]["msg"] = (empty($SYSENV["ALERT"]["msg"]) ? "NO MESSAGE" : $SYSENV["ALERT"]["msg"]);
16 $SYSENV["ALERT"]["today"] = date("m/d/Y");
17 $SYSENV["ALERT"]["twoweeks"] = date("m/d/Y",mktime (0,0,0,date("m") ,date("d")+14,date("Y")));
18 $SYSENV["ALERT"]["allow_html"] = "<B><I><P><A><LI><OL> <UL><EM><BR><TT><STRONG><BLOCKQUOTE>";
19 $SYSENV["ALERT"]["chome"]= strtolower($Cu);
20 extract($SYSENV["ALERT"]);
21 
22 switch ($action) {
23  case "yes":
24  alert_update($SYSENV, "delete alert");
25  break;
26  case "delete alert":
27  confirm($SYSENV, $alert, $action);
28  break;
29  case "add":
30  case "save":
31  case "save dates":
32  alert_update($SYSENV, "$action");
33  break;
34  case "stretchdate":
35  stretchdate($SYSENV, "$msg");
36  break;
37  case "cancel":
38  case "no":
39  $SYSENV["ALERT"]["alert"]="";
40  case "find or add":
41  case "ok":
42  getalert($SYSENV, "$msg");
43  break;
44  }
45 
46 
47 function alert_update($SYSENV, $action) {
48 
49  extract($SYSENV["globals"]);
50  extract($SYSENV["ALERT"]);
51 
52 $msg = "";
53 
54 
55 if ($action == "add" || $action == "save" || $action == "save dates") {
56  $aname= (trim($aname) == "" ? "" : prep_save($aname));
57  $sstart = (trim($sstart) == "" ? "$today" : $sstart);
58  $sstop = (trim($sstop) == "" ? "$twoweeks" : $sstop);
59  $a_msg= (trim($a_msg) == "" ? "" : $a_msg);
60 
61  # need to check start and stop dates here
62  if (trim($alert) == ""){ $msg .= "<li>Please Select an Alert Message</li>\n"; }
63  if (preg_match("/^ *$/",$alert)) { $msg .= "<li>Invalid Alert ID</li>\n";}
64  if (($starttime = strtotime($sstart)) === -1) {
65  $msg .= "<li>Invalid Start Date</li>\n";
66  } else {
67  list($mm,$dd,$yyyy) = explode("/",$sstart);
68  if (!validateDate("$mm", "$dd", "$yyyy")) {
69  $msg .= "<li>Invalid Start Date</li>\n";}
70  }
71  if (($stoptime = strtotime($sstop)) === -1) {
72  $msg .= "<li>Invalid Stop Date</li>\n";
73  } else {
74  list($mm,$dd,$yyyy) = explode("/",$sstop);
75  if (!validateDate("$mm", "$dd", "$yyyy")) {
76  $msg .= "<li>Invalid Stop Date</li>\n";}
77  }
78  if ($starttime > $stoptime) {
79  $msg .= "<li>Start Date must be before Stop Date</li>\n";}
80 
81  if (strlen($a_msg) > 500) {
82  $l = strlen($a_msg);
83  $msg .= "<li>$ques_test text is too long. Maximum length is 500 characters</li>\n";}
84 
85  if (strlen($smstext) > 250) {
86  $l = strlen($smstext);
87  $msg .= "<li>SMS TXT message text is too long. Maximum length is 250 characters</li>\n";}
88 
89 $a_msg = prep_save(strip_tags($a_msg, $allow_html));
90 $smstext = prep_save(strip_tags($smstext)); // No tags are allowed
91 }
92 
93  if ($msg == ""){
94 
95  switch ($action) {
96  case "delete alert":
97  $what = "Deleted";
98  $sql = "delete from cualertmsgs
99  where alertid='$alert' and cu='$Cu'; ";
100  break;
101  case "save":
102  $what = "Updated";
103  $sql= "update cualertmsgs set
104  startdate='$sstart', stopdate='$sstop',
105  alertname='$aname', message='$a_msg',
106  runstat=$rstat,
107  sms_message = '$smstext'
108  where alertid='$alert' and cu='$Cu'";
109 
110  break;
111 
112  case "save dates":
113  $what = "Updated";
114  $sql= "update cualertmsgs set
115  startdate='$sstart',
116  stopdate='$sstop'
117  where cu='$Cu'
118  and alertid = $alert";
119 
120  break;
121 
122  case "add":
123  $what = "Added";
124  $sql = "insert into cualertmsgs (cu,alertid, startdate,
125  stopdate, alertname, message, runstat,
126  sms_message) values (
127  '$Cu',nextval('cualertmsgs_alertid_seq'),
128  '$sstart','$sstop','$aname','$a_msg',
129  $rstat, '$smstext' );";
130 
131  }
132  $sth = db_query($sql,$dbh);
133  $msg = pg_errormessage();
134  if (!$sth) {
135  //require("errormail.i"); // Included by the script that calls this one
136  $notify = new ErrorMail;
137  $notify->line=__LINE__;
138  $notify->file=__FILE__;
139  $notify->callingfunction = __FUNCTION__;
140  $notify->error=$msg;
141  $notify->cu="$Cu";
142  $notify->survey="$alert";
143  $notify->sql="$sql";
144  $notify->SendErr();
145  }
146  if ($msg == "") { update_success($SYSENV, $what);}
147 
148  db_free_result($sth);
149  }
150  if ($msg) {
151  switch ($action) {
152  case "save dates":
153  stretchdate($SYSENV, "$msg");
154  break;
155  case "delete alert":
156  $SYSENV["ALERT"]["alert"]="";
157  case "add":
158  case "save":
159  default:
160  getalert($SYSENV, $msg);
161  break;
162  }
163 }
164 }
165 function getalert($SYSENV, $msg) {
166 
167  extract($SYSENV["globals"]);
168  extract($SYSENV["ALERT"]);
169 
170 print <<<EOF
171 <script language="javascript">
172 <!--
173  function show_help(marker)
174 {
175 helpwin=window.open(marker,"_Help","toolbar=1,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0,width=500,height=340");
176 helpwin.focus();
177  }
178  function show_preview(status)
179 {
180 var marker="SurveyView?cu=$Cu&chome=$chome&viewmsg=2&showid=";
181 var marker="main.prg?ft=51&cu=$Cu&chome=$chome&viewmsg=2&showid=";
182 helpwin=window.open(marker + status,"_Preview","toolbar=1,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0,width=600,height=380");
183 helpwin.focus();
184  }
185 // -->
186 </script>
187 EOF;
188 
189 if (trim($alert)=="") {
190  $urlfindadd=urlencode("Find or Add");
191  $urldelalert=urlencode("Delete Alert");
192 
193  // Determine the query by using the current ft type --
194  $sql= "select alertid, alertname,
195  to_char(startdate,'mm/dd/yy'),
196  to_char(stopdate,'mm/dd/yy'),
197  case when stopdate < CURRENT_DATE then 3
198  when startdate > CURRENT_DATE then 1
199  else 2 end as datestat,
200  runstat
201  from cualertmsgs
202  where cu='$Cu'
203  order by 5, 4 desc, 3 desc";
204 
205  $sth = db_query($sql,$dbh);
206  print <<<EOF
207  <div align=center><br><form action="$self">
208  <input type="hidden" name="ft" value="$ft">
209  <table width=95% cellspacing=1 cellpadding=4 border=0>
210  <tr><td class="bar" colspan=4 align=center>$Cu Alert Messages</td></tr>
211 EOF;
212  if ("$msg" != "NO MESSAGE") {
213  print <<<EOF
214  <tr><td class="msg" align=right><img src='/IMAGES/alert.black.gif'></td>
215  <td class="msg" colspan=3>$msg</td></tr>
216 EOF;
217  }
218 print<<<EOF
219 EOF;
220 print <<< EOF
221  <tr><td class="hdr" NOWRAP>Alert Messages
222  <a href='javascript:show_help("$helpdoc#top");'>$helpicon</a></td>
223  <td class="hdr" NOWRAP>Status
224  <a href='javascript:show_help("$helpdoc#status");'>$helpicon</a></td>
225  <td class="hdr" NOWRAP>Run Dates
226  <a href='javascript:show_help("$helpdoc#dates");'>$helpicon</a></td>
227  <td class="hdr" align="right">
228  <a href="$self?ft=$ft&action=${urlfindadd}&alert=new" class="white_link">New Alert Message</a>&nbsp;
229  <a href='javascript:show_help("$helpdoc#new");'>$helpicon</a></td></tr>
230 EOF;
231  $rbg="odd";
232  for ($row=0;list($alert, $aname, $sstart, $sstop, $dstat, $rstat) = db_fetch_array($sth,$row); $row++) {
233  switch ($dstat * $rstat){
234  case 0:
235  $sstat = "Draft";
236  break;
237  case 1:
238  $sstat = "Future";
239  break;
240  case 2:
241  $sstat = "Present";
242  break;
243  case 3:
244  $sstat = "Past";
245  break;
246  }
247  $urlaname=urlencode("$aname");
248 print <<<EOF
249  <tr class="$rbg"><td class="usul" colspan='3'>
250  <a href="$self?ft=$ft&alert=$alert&action=$urlfindadd">$aname</a></td>
251  <td class="usul">&nbsp;</td></tr>
252  <tr class="$rbg"><td class="usul">&nbsp;</td>
253  <td class="usul">$sstat</td>
254  <td class="usul">$sstart - $sstop</td>
255  <td class="usul" ><font size=-1>
256  |
257 <a href="$self?ft=$ft&alert=$alert&action=$urlfindadd"> &nbsp;Edit&nbsp;</a>
258  <a href='javascript:show_help("$helpdoc#edit");'>$helpicon</a> |
259 EOF;
260 
261 if ($dstat < 3) {
262 print <<<EOF
263 <a href="javascript:show_preview('$alert')"> &nbsp;View&nbsp;</a>
264  <a href='javascript:show_help("$helpdoc#preview");'>$helpicon</a> |
265 EOF;
266 } else {
267 print <<<EOF
268  &nbsp;View&nbsp;
269  <a href='javascript:show_help("$helpdoc#preview");'>$helpicon</a> |
270 EOF;
271 }
272 
273 if ($rstat == 1) {
274 print <<<EOF
275 <a href="$self?ft=$ft&alert=$alert&action=stretchdate"> &nbsp;Extend Date&nbsp;</a>
276  <a href='javascript:show_help("$helpdoc#extend");'>$helpicon</a> |
277 EOF;
278 } else {
279 
280 print <<<EOF
281  &nbsp;<font size="1">Extend Date</font>&nbsp;
282  <a href='javascript:show_help("$helpdoc#extend");'>$helpicon</a> |
283 EOF;
284 }
285 print <<<EOF
286  <a href="$self?ft=$ft&alert=$alert&action=$urldelalert&aname=$urlaname"> &nbsp;Delete&nbsp;</a>
287  <a href='javascript:show_help("$helpdoc#delete");'>$helpicon</a>
288  </font></td></tr>
289 EOF;
290 $rbg = ($rbg == "odd" ? "even" : "odd");
291 
292  }
293 print "</table></form></div>";
294 } else {
295 
296 print <<<EOF
297 <script>
298 function sendform(action)
299 {
300  document.forms[0].action.value=action;
301  document.forms[0].submit();
302 }
303 function validate(mode, chgrun)
304 {
305  var strAlert = document.forms[0].alert.value;
306  var strMessage = "";
307  var patSpaces = /^ *$/;
308  if (chgrun == 1)
309  {
310 
311  }
312 
313  // validate user entries
314 
315  if (strAlert.length == 0)
316  { strMessage += "Please Select an Alert ID.\\n";}
317  if (patSpaces.exec(strAlert) != null)
318  { strMessage += "Invalid Alert ID.\\n";}
319  if (strAlert.indexOf("'") != -1 || strAlert.indexOf('"') != -1)
320  { strMessage += "Invalid Characters in Alert ID.\\n";}
321 
322  if (strMessage.length > 0)
323  {
324  alert(strMessage);
325  return false;
326  } else {
327  document.forms[0].action.value=mode;
328  document.forms[0].submit();
329  return true;
330  }
331 
332 }
333 </script>
334 EOF;
335 
336 
337  $loadform = isset($a_msg);
338  if ($loadform == 0 ) {
339  $alertId = ctype_digit( $alert ) ? $alert : 0;
340  $sql= "select to_char(startdate,'mm/dd/yyyy'),
341  to_char(stopdate,'mm/dd/yyyy'),
342  alertname, message, runstat, sms_message
343  from cualertmsgs
344  where alertid='$alertId' and cu='$Cu'";
345  $sth = db_query($sql,$dbh);
346  if (list($sstart, $sstop, $aname, $a_msg, $rstat, $smstext)
347  = db_fetch_array($sth,0)) {
348  $AddChange = "Save";
349 
350  } else {
351  $AddChange = "Add";
352  }
353  $aname = (trim($aname) == "" ? "" : trim($aname));
354  $a_msg= (trim($a_msg) == "" ? "" : trim($a_msg));
355  $sstart = (trim($sstart) == "" ? "$today" : $sstart);
356  $sstop = (trim($sstop) == "" ? "$twoweeks" : $sstop);
357  $rstat = ($rstat == "" ? 0 : $rstat);
358 
359 
360  } else {
361  // We are reposting this form
362  }
363 
364  $aname = (trim($aname) == "" ? "" : trim($aname));
365  $a_msg= (trim($a_msg) == "" ? "" : trim($a_msg));
366  $smstext = (trim($smstext) == "" ? "" : trim($smstext));
367  $a_msg= htmlspecialchars($a_msg);
368  $smstext = htmlspecialchars($smstext);
369 print <<<EOF
370  <div align=center><br><form name="alertform" action = $self>
371  <input type="hidden" name="ft" value="$ft">
372  <table width=90% cellspacing=0 cellpadding=3 border=0>
373  <tr><td class="bar" colspan=2 align=center>$Cu Alert Messages</td></tr>
374 EOF;
375  if ($msg != "NO MESSAGE") {
376  print "<tr><td class='msg' colspan=2 align=left>
377  <ul>Error: $msg</ul></font></td></tr>";
378  }
379 print <<<EOF
380  <tr><td class="hdr">Alert Message Details &nbsp;</td>
381  <td class="hdr">&nbsp;
382  <input type=hidden name=alert value="$alert">
383  <input type=hidden name="action" value=""></td>
384  <input type=hidden name="AddChange" value="$AddChange">
385  </tr>
386  <tr><td class="small" align="right" nowrap>Alert Message Name <a href='javascript:show_help("$helpdoc#name");'>$helpicon</a>&nbsp;</td>
387  <td class="small" align="left">
388  <input type="text" name="aname" size="25" maxlength="50" value="$aname"></td>
389  </tr>
390  <tr><td class="small" align="right">Run Dates <a href='javascript:show_help("$helpdoc#dates");'>$helpicon</a>&nbsp;</td>
391  <td class="small" align="left">
392  <input type=text name="sstart" size="10" maxlength="10" value="$sstart"> &nbsp;to&nbsp;
393  <input type=text name="sstop" size="10" maxlength="10" value="$sstop"></td>
394  </tr>
395 
396  <tr><td class="small" align="right">Status <a href='javascript:show_help("$helpdoc#survstat");'>$helpicon</a>&nbsp;</td><td class="small" align="left"><input type="radio" name="rstat" value="1"
397 EOF;
398 if ($rstat == 1) {print " checked";}
399 print <<<EOF
400 > Running &nbsp;&nbsp;
401 <input type="radio" name="rstat" value="0"
402 EOF;
403 if ($rstat == 0) {print " checked";}
404 
405 
406 print <<<EOF
407 > Draft </td></tr>
408 EOF;
409 $view_allow_html = htmlspecialchars($allow_html);
410 print <<< EOF
411  <tr><td colspan=2 class="small" align="center"><hr width=60%></td></tr>
412  <tr>
413  <td class="small" align="right" valign="top">
414  E-mail Message <a href='javascript:show_help("$helpdoc#alertm");'>$helpicon</a>&nbsp;
415  </td>
416  <td class="small" align="left">
417  <textarea cols="25" rows="6" wrap="virtual" name="a_msg">$a_msg</textarea><br>
418  Allowed HTML: <font size="1">$view_allow_html</font>
419  </td>
420  </tr>
421  <tr>
422  <td class="small" align="right" valign="top">SMS TXT Message <a href='javascript:show_help("$helpdoc#alertw");'>$helpicon</a>&nbsp;</td><td class="small" align="left"><textarea cols="25" rows="3" wrap="virtual" name="smstext">$smstext</textarea></td></tr>
423 EOF;
424 
425 print <<<EOF
426  <tr><td class="hdr" colspan=2 align=center><hr>
427  <input type=button value="$AddChange" onClick="validate('$AddChange','$chgrun');">
428 EOF;
429 if ($AddChange == "Save") {
430  print <<<EOF
431 <a href='javascript:show_help("$helpdoc#save");'>$helpicon</a>&nbsp;
432  <input type=button value="Delete Alert" onClick="sendform('Delete Alert');"><a href='javascript:show_help("$helpdoc#edit_delete");'>$helpicon</a>&nbsp;
433 EOF;
434 } else {
435  print <<<EOF
436 <a href='javascript:show_help("$helpdoc#add");'>$helpicon</a>&nbsp;
437 EOF;
438 }
439  print "<input type=button value=\"Cancel\" onClick=\"sendform('Cancel');\">
440 <a href='javascript:show_help(\"$helpdoc#cancel\");'>$helpicon</a></td></tr></table></form></div>";
441 }
442 }
443 
444 function stretchdate($SYSENV, $msg) {
445  extract($SYSENV["globals"]);
446  extract($SYSENV["ALERT"]);
447 
448 print <<<EOF
449 <script language="javascript">
450 <!--
451  function show_help(marker)
452 {
453 helpwin=window.open(marker,"_Help","toolbar=1,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0,width=500,height=340");
454 helpwin.focus();
455  }
456 // -->
457 </script>
458 EOF;
459 
460 if (trim($alert)=="") {
461  # redirect to menu?
462 } else {
463 print <<<EOF
464 <script>
465 function sendform(action)
466 {
467  document.forms[0].action.value=action;
468  document.forms[0].submit();
469 }
470 </script>
471 EOF;
472 
473  $sql = "select to_char(startdate,'mm/dd/yyyy') as sstart,
474  to_char(stopdate,'mm/dd/yyyy') as sstop,
475  m.alertname, message
476  from cualertmsgs m
477  where m.alertid = $alert
478  and m.cu='$Cu'
479  order by stopdate, m.alertid";
480 
481  $sth = db_query($sql,$dbh);
482 
483  if (db_num_rows($sth) == 0 ) {
484  # redirect to menu?
485 
486  }
487 #
488 # get just the first row and format the heading
489 #
490  list( $sstart, $sstop, $aname, $a_msg ) =
491  db_fetch_array($sth,$row);
492 
493  $aname = (trim($aname) == "" ? "" : trim($aname));
494  $a_msg= (trim($a_msg) == "" ? "" : trim($a_msg));
495  $sstart = (trim($sstart) == "" ? "$today" : $sstart);
496  $sstop = (trim($sstop) == "" ? "$twoweeks" : $sstop);
497  $atext = (trim($atext) == "" ? "" : $atext);
498 
499  print <<<EOF
500  <div align=center><br><form name="dateform" action = $self>
501  <input type="hidden" name="ft" value="$ft">
502  <table width=90% cellspacing=0 cellpadding=3 border=0>
503  <tr><td class="bar" colspan=2 align=center>$Cu Alert Message Date Change</td></tr>
504 EOF;
505  if ($msg != "NO MESSAGE") {
506  print "<tr><td class='msg' colspan=2 align=left>
507  <ul>Error: $msg</ul></font></td></tr>";
508  }
509 print <<<EOF
510  <tr><td class="hdr" colspan=2>
511  <input type=hidden name=alert value="$alert">
512  <input type=hidden name="action" value=""></td>
513  </tr>
514  <tr><td class="small" align="right">Alert Message Name <a href='javascript:show_help("$helpdoc#name");'>$helpicon</a>&nbsp;</td>
515  <td class="small">$aname</td>
516  </tr>
517  <tr><td class="small" align="right">Run Dates <a href='javascript:show_help("$helpdoc#dates");'>$helpicon</a>&nbsp;</td>
518  <td class="small">
519  <input type=text name="sstart" size="10" maxlength="10" value="$sstart">
520 &nbsp;to&nbsp;
521  <input type=text name="sstop" size="10" maxlength="10" value="$sstop"></td>
522  </tr>
523  <tr><td colspan=2 class="small"><hr width=60%></td></tr>
524  <tr><td class="small">&nbsp;</td>
525  <td class="small">&nbsp;
526  <input type=button value="Save Dates" onClick="sendform('Save Dates');"><a href='javascript:show_help("$helpdoc#savedate");'>$helpicon</a>&nbsp;&nbsp;
527  <input type=button value="Cancel" onClick="sendform('Cancel');"><a href='javascript:show_help("$helpdoc#cancel");'>$helpicon</a></td></tr>
528 </table></form>
529  <table border=0 CELLSPACING=0 CELLPADDING=3 width=90%>
530  <tr><td CLASS=ahd>$a_msg</td></tr>
531  <tr><td>&nbsp;<font size=-1>$atext</font></td></tr>
532 EOF;
533 
534 #
535 # Now get the rest of the rows and format the possible answers
536 #
537 
538  for ($row=1; list( $sstart, $sstop, $aname, $a_msg, $atext ) =
539  db_fetch_array($sth,$row); $row++) {
540 
541  print <<<EOF
542  <tr><td>&nbsp;<font size=-1>$atext</font></td></tr>
543 EOF;
544 
545  }
546  print "</table>";
547  print "</div>";
548  db_free_result($sth);
549 
550 
551 }
552 }
553 
554 function confirm($SYSENV, $alert, $action) {
555  extract($SYSENV["globals"]);
556  extract($SYSENV["ALERT"]);
557 
558  if (!$alert) {
559  getalert("You must enter a alert number");
560  return;
561  }
562 
563  $aname = (trim($aname) == "" ? "" : trim($aname));
564 
565  print <<<EOF
566  <div align=center><br><form action="$self">
567  <input type="hidden" name="ft" value="$ft">
568  <table width=90% cellspacing=0 cellpadding=4 border=0>
569  <tr><td class="bar" colspan=2 align=center>$Cu Alert Messages</td></tr>
570  <tr><td class="ahd" colspan=2 align=center>Warning! This action will delete all the alert '$aname'.<br>Do you wish to continue?</td></tr>
571 EOF;
572 print <<<EOF
573  <tr><td class="hdr" colspan=2><hr></td>
574  <tr><td class="hdr" align=right>
575  <input type=submit name="action" value="Yes">
576  </td>
577  <td class="hdr" align=left>
578  <input type=submit name="action" value="No">
579  </td>
580  </tr>
581  </table>
582  <input type=hidden name="alert" value="$alert">
583  <input type=hidden name="todelete" value="delete alert">
584  </form></div>
585 EOF;
586 }
587 
588 function update_success($SYSENV, $what) {
589  extract($SYSENV["globals"]);
590  extract($SYSENV["ALERT"]);
591 
592  $msg=urlencode("Alert Message $what Successfully");
593  header("Location: $main_url?ft=$ft&msg=$msg");
594 }
595 function error_exit($reason) {
596  print <<<EOF
597  <CENTER><BR>
598  <TABLE BORDER=0 CELLPADDING=6 WIDTH=90%>
599 <tr><td CLASS="bar" align="center">$Cu Alert Messages
600 </td></tr><tr>
601  <td class='hdr' align='center'>
602  Unable to complete your request</td></tr>
603  <tr><td class='dtl' align='center'>
604  ${reason}.
605  </td></tr></table>
606 EOF;
607 exit;
608 }